Spring 3 Security Authentication Success Handler

Posted by Eqbal on Stack Overflow See other posts from Stack Overflow or by Eqbal
Published on 2010-04-29T19:21:03Z Indexed on 2010/04/29 19:27 UTC
Read the original article Hit count: 913

Filed under:

I am using form-login for security and I am trying to implement an authentication success handler, but I am not sure how to go back to the resource that was initially requested before the login process. By default I think it implements a SimpleUrlAuthenticationSuccessHandler and I tried to mirror that class implementation. But it sets a setDefaultTargetUrl(defaultTargetUrl) and perhaps thats where the magic happens that it remembers the resource to go back to after the login process.

Any help is greatly appreciated. Below is my spring security <form-login/> element

<form-login login-page="/login.jsp" login-processing-url="/b2broe_login"
        authentication-success-handler-ref="passwordExpiredHandler" 
        authentication-failure-url="/login.jsp?loginfailed=true" />

© Stack Overflow or respective owner

Related posts about spring-security