Saturday, 20 October 2012

RememberMe service in spring security is not working

In the Spring security they provide 2 ways to use the rememberMe service.

  1. In the rememberMeService Definition[Configuration file], "alwaysRememberMe" property should be true. First time when user tries to access the secure URL it will take user to login page. After first login, Application will not ask user to login again until user hits logout link or cookies has been deleted or expired.
  2. Other way we can provide check box on login screen to give freedom to user to choose, does he/she wants to save login or not.To make it work check box should be specified with name "_spring_security_remember_me" and value="true".Remember me service would not save user's credentials until user hits the checkbox.

Its working for me..

No comments:

Post a comment