I have written a jsp login page that accepts login and password from the user. Once the user is authenticated, I put some information the related User Class in the Session and use it throughout application. If on access to a page, we find that there is no user class in the session, we send the user to the login page.
Now, I want to put "remember me" option on the login page. If a user selects a checkbox, he should "never" be asked for login again. Although I can figure out how to do it using cookies and database, I do not want to reinvent the wheel.
I have the following requirements:
1. It should be database independent
2. It should be webserver/appserver independent
3. It should be quite secure.
Can anyone point me to a good reference source or implementation? Or is there a standard way of doing it?