Skip to content

Commit f3bcf7e

Browse files
Revert "Update max sessions docs"
This reverts commit c86fd99.
1 parent c86fd99 commit f3bcf7e

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

docs/modules/ROOT/pages/reactive/authentication/concurrent-sessions-control.adoc

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@ Java::
202202
[source,java,role="primary"]
203203
----
204204
@Bean
205-
SecurityWebFilterChain filterChain(ServerHttpSecurity http, DefaultWebSessionManager webSessionManager) {
205+
SecurityWebFilterChain filterChain(ServerHttpSecurity http) {
206206
http
207207
// ...
208208
.sessionManagement((sessions) -> sessions
209209
.concurrentSessions((concurrency) -> concurrency
210210
.maximumSessions(SessionLimit.of(1))
211-
.maximumSessionsExceededHandler(new PreventLoginMaximumSessionsExceededHandler(webSessionManager.getSessionStore()))
211+
.maximumSessionsExceededHandler(new PreventLoginMaximumSessionsExceededHandler())
212212
)
213213
);
214214
return http.build();
@@ -225,13 +225,13 @@ Kotlin::
225225
[source,kotlin,role="secondary"]
226226
----
227227
@Bean
228-
open fun springSecurity(http: ServerHttpSecurity, webSessionManager: DefaultWebSessionManager): SecurityWebFilterChain {
228+
open fun springSecurity(http: ServerHttpSecurity): SecurityWebFilterChain {
229229
return http {
230230
// ...
231231
sessionManagement {
232232
sessionConcurrency {
233233
maximumSessions = SessionLimit.of(1)
234-
maximumSessionsExceededHandler = PreventLoginMaximumSessionsExceededHandler(webSessionManager.sessionStore)
234+
maximumSessionsExceededHandler = PreventLoginMaximumSessionsExceededHandler()
235235
}
236236
}
237237
}
@@ -380,11 +380,6 @@ public class SessionControl {
380380
----
381381
======
382382

383-
[NOTE]
384-
====
385-
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`.
386-
====
387-
388383
[[disabling-for-authentication-filters]]
389384
== Disabling It for Some Authentication Filters
390385

0 commit comments

Comments
 (0)