Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: using authentication token during authorisation

  1. #11
    Join Date
    Sep 2010
    Posts
    12

    Default

    That's what I suspected (but wasn't sure about): that the request object is discarded and a new authentication object is created.

    Thanks for your comments.

    Another question I asked before: in my own implementation of attemptAuthentication() I took over the following lines of code:

    Code:
    // Place the last username attempted into HttpSession for views
             HttpSession session = request.getSession (false);
             if (session != null || getAllowSessionCreation ())
             {
                request.getSession ().setAttribute (SPRING_SECURITY_LAST_USERNAME_KEY, TextUtils.escapeEntities (username));
             }
    
             // Allow subclasses to set the "details" property
             setDetails (request, authRequest);
    Are they needed or can I remove them?

  2. #12
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    It depends on whether you want access to the username (in a failed authentication view, for example) or the "details" object created by the authentication filter for any reason. If you don't, then you don't need them.
    Spring - by Pivotal
    twitter @tekul

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •