Missing example with Spring Security maximum sessions feature
See original GitHub issueThere is no example to illustrate session management with maximum sessions.
The java code is:
.sessionManagement()
.maximumSessions(1)
.maxSessionsPreventsLogin(false)
.expiredUrl("/login?expired")
but logout does not invalidate the login.
There are some forums that mention org.springframework.security.web.session.HttpSessionEventPublisher, but it’s supposed to be added to web.xml, which Spring Boot doesn’t use.
I can’t piece it together into code that successfully logs the user out and allows for a new login.
Issue Analytics
- State:
- Created 9 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Spring Security Session - How to Control Session with Spring ...
Spring security supports the feature to limit multiple login for the same user through session management. The first step to enable this ...
Read more >Spring Security maxSession doesn't work - Stack Overflow
I want to prevent login when user exceed maxSession count. For example every user can login once. And then if ...
Read more >Session Management :: Spring Security
Spring Security can prevent a principal from concurrently authenticating to the same application more than a specified number of times. Many ISVs take...
Read more >Spring security concurrent sessions - YouTube
Spring security concurrent sessions. Lean how to use the # springsecurity and the concurrent sessions control feature to restricting the ...
Read more >Using Sessions and Session Persistence - Oracle Help Center
You can set the maximum life of a cookie with the cookie-max-age-secs element in the session descriptor of the weblogic.xml deployment descriptor.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There are a few things going on here
A complete example can be found below:
@tanojkumar A closed issue from almost 3 years ago isn’t a good place to look for some help. Please use Stack Overflow or Gitter instead.