I have 2 web applications running under 2 tomcats. Both these applications use the same UserDetailsService for authentication and same database. I am kinda of confused on how would I be able to autologin the user to the other application running in the same browser or cross browser once he has authenticated himself in one of the application.
Will this help ?
<session-management session-fixation-protection="none">
<concurrency-control max-sessions="2" />
</session-management>
The snippet posted above will not work. All it tells spring security is to allow two sessions for the specified user at a time.
What you need is a single sign on for both the applications. You may want to explore spring security’s CAS support.