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
ConstructorsConstructorDescriptionWebSessionStoreReactiveSessionRegistry(org.springframework.web.server.session.WebSessionStore webSessionStore) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<ReactiveSessionInformation>getAllSessions(Object principal) Gets all the knownReactiveSessionInformationinstances for the specified principal.reactor.core.publisher.Mono<ReactiveSessionInformation>getSessionInformation(String sessionId) Gets theReactiveSessionInformationfor 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 theReactiveSessionInformationvoidsetSessionRegistry(ReactiveSessionRegistry sessionRegistry) Sets theReactiveSessionRegistryto 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:ReactiveSessionRegistryGets all the knownReactiveSessionInformationinstances for the specified principal.- Specified by:
getAllSessionsin interfaceReactiveSessionRegistry- Parameters:
principal- the principal- Returns:
- the
ReactiveSessionInformationinstances associated with the principal
-
saveSessionInformation
public reactor.core.publisher.Mono<Void> saveSessionInformation(ReactiveSessionInformation information) Description copied from interface:ReactiveSessionRegistrySaves theReactiveSessionInformation- Specified by:
saveSessionInformationin interfaceReactiveSessionRegistry- Parameters:
information- theReactiveSessionInformationto save- Returns:
- a
Monothat completes when the session is saved
-
getSessionInformation
public reactor.core.publisher.Mono<ReactiveSessionInformation> getSessionInformation(String sessionId) Description copied from interface:ReactiveSessionRegistryGets theReactiveSessionInformationfor the specified session identifier.- Specified by:
getSessionInformationin interfaceReactiveSessionRegistry- Parameters:
sessionId- the session identifier- Returns:
- the
ReactiveSessionInformationfor the session.
-
removeSessionInformation
public reactor.core.publisher.Mono<ReactiveSessionInformation> removeSessionInformation(String sessionId) Description copied from interface:ReactiveSessionRegistryRemoves the specified session from the registry.- Specified by:
removeSessionInformationin interfaceReactiveSessionRegistry- Parameters:
sessionId- the session identifier- Returns:
- a
Monothat completes when the session is removed
-
updateLastAccessTime
public reactor.core.publisher.Mono<ReactiveSessionInformation> updateLastAccessTime(String sessionId) Description copied from interface:ReactiveSessionRegistryUpdates the last accessed time of theReactiveSessionInformation- Specified by:
updateLastAccessTimein interfaceReactiveSessionRegistry- Parameters:
sessionId- the session identifier- Returns:
- a
Monothat completes when the session is updated
-
setSessionRegistry
Sets theReactiveSessionRegistryto use.- Parameters:
sessionRegistry- theReactiveSessionRegistryto use. Cannot be null.
-