Spring security create session after login

This article will show how to quickly and safely implement this mechanism using Spring Security. Authorization is implemented via XML file configuration appconfig-security.xml. 2: We create a RedisConnectionFactory that connects Spring Session to the Redis Server. To implement login/authentication with Spring Security, we need to implement org.springframework.security.core.userdetails.UserDetailsService interface. OverviewHow multiple user session in single browser work?2. Security Service. Table of Contents1. 1: The @EnableRedisHttpSession annotation creates a Spring bean with the name of springSessionRepositoryFilter that implements Filter.The filter is in charge of replacing the HttpSession implementation to be backed by Spring Session. In this instance Spring Session is backed by Redis. We create SecurityService to provide current logged in user and auto login user after registration A common requirement for a web application is to redirect different types of users to different pages after login.An example of this would be redirecting standard users to a /homepage.html page and admin users to a /console.html page for example..

This article contains example of spring security multiple users sessions in single browser using spring or maintains multiple user account in same session using spring security.