-
Dec 19th, 2012, 04:27 AM
#1
Destroy a session of another user
Hello, in my application I have a admin that can delete users so when I delete a user I want that the user log out automatically.
I know user's session id who I delete but I don't know how invalidate a session using the session id.
I would like something like: invalidate(SessionId);
Is it possible in any way?
Thanks.
-
Dec 20th, 2012, 01:29 AM
#2
You can do this when you have Spring Security and have enabled SessionManagement / SessionTracking else it isn't going to be possible.
Another way would be to create a filter which checks if the user is still valid (when the user issues a request) if not, logout user and show page.
-
Feb 28th, 2013, 07:09 AM
#3
My idea is when I do delete(user) in the controller, the controller gets the session of the user and destroy it, but I think it isn't possible.
The best way that exists, I think is to create a filter and check if the user is in DB if isn't destroy the session.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules