I am using spring security 4. Scenario is i want one user to login at a one time. that is if my login credentials know to someone and i have already logged in but that someone should not be able to login unless and untill i logged out which i implemented successfully by setting maximumSessions(1) and maxSessionsPreventsLogin(true) .
My requirement is if someone with my login credentials is trying to log in even if i already logged in. i want to show error message like user is already logged in inside my thyemeaf login page..
in my case it shows invalid login name or password error if someone with my login credentials is trying to log in even if i already logged in.
I want to show custom error message like user is already logged in inside my thyemeaf login page. How can i implemant that? Note:- I am using custom login success handler and custom logout success handler