Class WebSessionStoreReactiveSessionRegistry
java.lang.Object
org.springframework.security.web.session.WebSessionStoreReactiveSessionRegistry
- All Implemented Interfaces:
ReactiveSessionRegistry
public final class WebSessionStoreReactiveSessionRegistry
extends Object
implements ReactiveSessionRegistry
A
ReactiveSessionRegistry
implementation that uses a WebSessionStore
to
invalidate a WebSession
when the ReactiveSessionInformation
is
invalidated.- Since:
- 6.3
-
Constructor Summary
ConstructorDescriptionWebSessionStoreReactiveSessionRegistry
(org.springframework.web.server.session.WebSessionStore webSessionStore) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<ReactiveSessionInformation>
getAllSessions
(Object principal) Gets all the knownReactiveSessionInformation
instances for the specified principal.reactor.core.publisher.Mono<ReactiveSessionInformation>
getSessionInformation
(String sessionId) Gets theReactiveSessionInformation
for the specified session identifier.reactor.core.publisher.Mono<ReactiveSessionInformation>
removeSessionInformation
(String sessionId) Removes the specified session from the registry.reactor.core.publisher.Mono<Void>
saveSessionInformation
(ReactiveSessionInformation information) Saves theReactiveSessionInformation
void
setSessionRegistry
(ReactiveSessionRegistry sessionRegistry) Sets theReactiveSessionRegistry
to use.reactor.core.publisher.Mono<ReactiveSessionInformation>
updateLastAccessTime
(String sessionId) Updates the last accessed time of theReactiveSessionInformation
-
Constructor Details
-
WebSessionStoreReactiveSessionRegistry
public WebSessionStoreReactiveSessionRegistry(org.springframework.web.server.session.WebSessionStore webSessionStore)
-
-
Method Details
-
getAllSessions
Description copied from interface:ReactiveSessionRegistry
Gets all the knownReactiveSessionInformation
instances for the specified principal.- Specified by:
getAllSessions
in interfaceReactiveSessionRegistry
- Parameters:
principal
- the principal- Returns:
- the
ReactiveSessionInformation
instances associated with the principal
-
saveSessionInformation
public reactor.core.publisher.Mono<Void> saveSessionInformation(ReactiveSessionInformation information) Description copied from interface:ReactiveSessionRegistry
Saves theReactiveSessionInformation
- Specified by:
saveSessionInformation
in interfaceReactiveSessionRegistry
- Parameters:
information
- theReactiveSessionInformation
to save- Returns:
- a
Mono
that completes when the session is saved
-
getSessionInformation
public reactor.core.publisher.Mono<ReactiveSessionInformation> getSessionInformation(String sessionId) Description copied from interface:ReactiveSessionRegistry
Gets theReactiveSessionInformation
for the specified session identifier.- Specified by:
getSessionInformation
in interfaceReactiveSessionRegistry
- Parameters:
sessionId
- the session identifier- Returns:
- the
ReactiveSessionInformation
for the session.
-
removeSessionInformation
public reactor.core.publisher.Mono<ReactiveSessionInformation> removeSessionInformation(String sessionId) Description copied from interface:ReactiveSessionRegistry
Removes the specified session from the registry.- Specified by:
removeSessionInformation
in interfaceReactiveSessionRegistry
- Parameters:
sessionId
- the session identifier- Returns:
- a
Mono
that completes when the session is removed
-
updateLastAccessTime
public reactor.core.publisher.Mono<ReactiveSessionInformation> updateLastAccessTime(String sessionId) Description copied from interface:ReactiveSessionRegistry
Updates the last accessed time of theReactiveSessionInformation
- Specified by:
updateLastAccessTime
in interfaceReactiveSessionRegistry
- Parameters:
sessionId
- the session identifier- Returns:
- a
Mono
that completes when the session is updated
-
setSessionRegistry
Sets theReactiveSessionRegistry
to use.- Parameters:
sessionRegistry
- theReactiveSessionRegistry
to use. Cannot be null.
-