mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-05 10:12:36 +00:00
Revert "Update max sessions docs"
This reverts commit c86fd99c8fb9098eb2818144d7fb17bfe1ddfb61.
This commit is contained in:
parent
c86fd99c8f
commit
f3bcf7ed5d
@ -202,13 +202,13 @@ Java::
|
|||||||
[source,java,role="primary"]
|
[source,java,role="primary"]
|
||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
SecurityWebFilterChain filterChain(ServerHttpSecurity http, DefaultWebSessionManager webSessionManager) {
|
SecurityWebFilterChain filterChain(ServerHttpSecurity http) {
|
||||||
http
|
http
|
||||||
// ...
|
// ...
|
||||||
.sessionManagement((sessions) -> sessions
|
.sessionManagement((sessions) -> sessions
|
||||||
.concurrentSessions((concurrency) -> concurrency
|
.concurrentSessions((concurrency) -> concurrency
|
||||||
.maximumSessions(SessionLimit.of(1))
|
.maximumSessions(SessionLimit.of(1))
|
||||||
.maximumSessionsExceededHandler(new PreventLoginMaximumSessionsExceededHandler(webSessionManager.getSessionStore()))
|
.maximumSessionsExceededHandler(new PreventLoginMaximumSessionsExceededHandler())
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return http.build();
|
return http.build();
|
||||||
@ -225,13 +225,13 @@ Kotlin::
|
|||||||
[source,kotlin,role="secondary"]
|
[source,kotlin,role="secondary"]
|
||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
open fun springSecurity(http: ServerHttpSecurity, webSessionManager: DefaultWebSessionManager): SecurityWebFilterChain {
|
open fun springSecurity(http: ServerHttpSecurity): SecurityWebFilterChain {
|
||||||
return http {
|
return http {
|
||||||
// ...
|
// ...
|
||||||
sessionManagement {
|
sessionManagement {
|
||||||
sessionConcurrency {
|
sessionConcurrency {
|
||||||
maximumSessions = SessionLimit.of(1)
|
maximumSessions = SessionLimit.of(1)
|
||||||
maximumSessionsExceededHandler = PreventLoginMaximumSessionsExceededHandler(webSessionManager.sessionStore)
|
maximumSessionsExceededHandler = PreventLoginMaximumSessionsExceededHandler()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -380,11 +380,6 @@ public class SessionControl {
|
|||||||
----
|
----
|
||||||
======
|
======
|
||||||
|
|
||||||
[NOTE]
|
|
||||||
====
|
|
||||||
If you are not using the `WebSessionStoreReactiveSessionRegistry` as the implementation, and you want the `WebSession` to be invalidated as well, you will need to use the `WebSessionStore` to retrieve and invalidate the `WebSession`.
|
|
||||||
====
|
|
||||||
|
|
||||||
[[disabling-for-authentication-filters]]
|
[[disabling-for-authentication-filters]]
|
||||||
== Disabling It for Some Authentication Filters
|
== Disabling It for Some Authentication Filters
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user