Reputation: 3193
I'm developing an application that user can log in in the system, and if another user tries to log in with the same id and password of the user that already logged, I need to invalidate the session of this user that already logged in and make him/her go back to the first page and make log in with the new user.
How can I develop this?
Upvotes: 0
Views: 506
Reputation: 66657
You may need to keep track of already logged-in users either in application scope/DB. For each user when you try to create a session, make sure no other session already exists. If exists by using SessionListeners you may need to do session invalidate.
Upvotes: 3