Announcement Announcement Module
No announcement yet.
Forwarding instead of redirecting on authentication success Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.