Spring 3 Security Authentication Defender

I use it form-loginfor security and I'm trying to implement an authentication success handler, but I'm not sure how to return to the resource that was originally requested before the login process. By default, I think it implements SimpleUrlAuthenticationSuccessHandler, and I tried to reflect this implementation of the class. But he sets up, setDefaultTargetUrl(defaultTargetUrl)and possibly one where the magic happens when he remembers the resource returned after the login process.

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

<form-login login-page="/login.jsp" login-processing-url="/b2broe_login"
        authentication-success-handler-ref="passwordExpiredHandler" 
        authentication-failure-url="/login.jsp?loginfailed=true" />
+5
source share
1 answer

SavedRequestAwareAuthenticationSuccessHandler, <form-login>.

+8

All Articles