Wednesday, February 17, 2010

Spring - Finding the last user name in controller

HttpSession ss = request.getSession();
ss.getAttribute(AuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY)

AuthenticationProcessingFilter is depricated use UsernamePasswordAuthenticationFilter instead

Click here for more details

This will be useful, when u want to redirect to different page from your Authentication Providers using form-login tag in http security.

form-login login-page="/login.do" default-target-url="/something.do" authentication-failure-url="/loginfailure.do"

No comments: