I’m using Spring Security for securing HTTP requests to a website. The primary usage is for securing pages such that the user is redirected to the login page when trying to access those pages.
However, I have a further requirement. In my model, I can flag a user’s password as being temporary such that, when they successfully login, they should be automatically forced to change their password. Once the password is changed, they should then be forwarded on to the page they were originally trying to access.
Has anyone used Spring Security for this purpose? Do I need to create my own custom filter?
Thanks,
Andrew
In Spring Security 3.0 you can implement a custom
AuthenticationSuccessHandler.In this handler you can redirect a user with temporary password to the password change page instead of the originally requested page. After password is changed, you may redirect user to the originally requested page using
SavedRequestAwareAuthenticationSuccessHandler, which is the default handler implementation.