Users need to login at the same time from one place only in java

I want this to assume that if a user is visiting my site from one location and at the same time the user tries to login from a different location / computer, then it should display "user is already registered" or should give some error. I am not asking for code, so please do not close this question. I searched and then only I post this as a question.
Someone please give me some links or some ideas so that I can implement it in my project. I made a site in JAVA STRUTS2.

+3


source to share


1 answer


Spring Security has this, take a look at http://docs.spring.io/spring-security/site/docs/3.1.x/reference/session-mgmt.html#concurrent-sessions



You can use spring security (which means reusing your entire auth file) or look at their classes for concurrency and implement something like that.

+1


source







All Articles