Results 1 to 2 of 2

Thread: Forwarding instead of redirecting on authentication success

  1. #1
    Join Date
    Oct 2012
    Location
    France
    Posts
    1

    Default Forwarding instead of redirecting on authentication success

    Hi all !

    Mobile phone Ajax request do not support HTTP 302 for authentication requests.
    The SimpleUrlAuthenticationFailureHandler supports request forwarding instead of redirecting, but not its counterpart, the SimpleUrlAuthenticationSuccessHandler.

    Is this on purpose (to avoid caching authentication request, but you generally do not want to cache POST requests) ? Did I miss some configuration part ?

    To cleanly add forward behavior to this success handler, I injected a special RedirectStrategy that does the forward, but I am not very satisfied of this solution :
    - A RedirectStrategy that forwards requests instead is not very clean,
    - I have to define the AuthenticationSuccess bean outside of the <form-login> element (this point is less annoying, and could not be avoidable)

    Could someone show be the light ?
    Thank you !
    --
    Olivier Billard

  2. #2
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    You should be able to follow the redirects. If you do not want to do this, then creating an AuthenticationSuccessHandler that does the forward should work.
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

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
  •