What's the best practice to implement sign in "Remember Me" feature in Java?
Obviously, storing cookies with username and password in user's browser is not secure enough. Create authentication token in cookies and db instead? Any simple examples?
What's the best practice to implement sign in "Remember Me" feature in Java?
Obviously, storing cookies with username and password in user's browser is not secure enough. Create authentication token in cookies and db instead? Any simple examples?
Take a look at the Spring Security framework. You can achieve this scenario with a few lines of configuration.
I'll second the suggestion of using Spring Security. It comes with a couple of different implementations for managing the token stored in the cookie on the users's browser.
http://static.springframework.org/spring-security/site/reference/html/remember-me.html