I am using AngularJS 1.2.5 and JBOSS AS 7.

On Thursday, January 30, 2014 2:36:20 AM UTC-6, Paul McCaughtry wrote:
>
> Has anyone used JBOSS and OAUTH2 to create a ReSTful login API? The 
> application I'm working has constraint of using Java backend that utilizes 
> SSL and OAUTH2.
>
> I would like to post j_username and j_password to j_security_check via 
> $resource POST in an AngularJS service. When I do so, I receive 200 but 
> authentication never happens. I verify that that both j_username and 
> j_password values are what I expect and set headers for content-type 
> as application/x-www-form-urlencoded. Everything in the application 
> dependent on authentication fails to load.
>
> The alternative is a <grrr> page request from a traditional form post. 
> This method fails on client-side redirect. I have a cookie tracking the 
> last route a user visited. If this cookie doesn't exist, the app should 
> redirect to a default route. When using the traditional form submission, I 
> see in Firebug that instead of redirecting to the route, j_security_check 
> is trying to load the path to the template assigned to the route in the 
> configuration. If I hit the back button, I see the route stored in the 
> cookie and the data is populated in the view.
>
> Is this something that can be configured in the web.xml file, does it 
> require an interceptor servlet or is it not possible to POST the form 
> fields via ajax? I'd like a solution that allows the SPA to remain an SPA.
>
> Thank you.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to