0 Replies Latest reply on Dec 9, 2009 5:29 AM by angeli106

    How do i get an authentication token from spring security?

    angeli106

      Hi guys, my question is this:

      How can i tell whether i got authenticated by spring security after i send an HTTPService request?

      If i'm not authenticated i'll get the login page as a response, but outside parsing it and seeing that it's an html login page how can i tell whether i did actually get authenticated or not? i suppose that i'm getting a cookie or something with the credentials but i dunno how to access it.. can any1 help?

       

      This is my flex app:

       

      <fx:Declarations>

           <mx:HTTPService

                id="loginService"

                url="http://localhost:9090/UserManagement/j_spring_security_check"

                showBusyCursor="true"

                method="POST"

                result="loginServiceResultHandler(event)"

                fault="loginServiceFaultHandler(event)">

                <mx:request>

                     <j_username>{userName.text}</j_username>

                     <j_password>{password.text}</j_password>

                </mx:request>

           </mx:HTTPService>

       

      </fx:declarations>

       

      I hope my question is clear enuf