I have requirement to have only one session open for user.
1. user_one logged in from machine_1.
2. Now user_one is trying to login from machine_2
Then on approval, session from machine_1 should get destroyed.
Now, we are capturing session ID every time one get created. And we have user id.
But as per our understanding, we can only destroy current session/context for current thread.
We are not able to destroy session on Machine_1 as it is another thread. And OpenMRS is also not using spring security features.
Can any one please suggest, how to close session for user which is running in different thread?