Class SpringSessionBackedReactiveSessionRegistry<S extends Session>
java.lang.Object
org.springframework.session.security.SpringSessionBackedReactiveSessionRegistry<S>
- Type Parameters:
S
- theSession
type.
- All Implemented Interfaces:
org.springframework.security.core.session.ReactiveSessionRegistry
public final class SpringSessionBackedReactiveSessionRegistry<S extends Session>
extends Object
implements org.springframework.security.core.session.ReactiveSessionRegistry
A
ReactiveSessionRegistry
that retrieves session information from Spring
Session, rather than maintaining it itself. This allows concurrent session management
with Spring Security in a clustered environment.
Relies on being able to derive the same String-based representation of the principal
given to getAllSessions(Object)
as used by Spring Session in order to look up
the user's sessions.
- Since:
- 3.3
-
Constructor Summary
ConstructorDescriptionSpringSessionBackedReactiveSessionRegistry
(ReactiveSessionRepository<S> sessionRepository, ReactiveFindByIndexNameSessionRepository<S> indexedSessionRepository) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<org.springframework.security.core.session.ReactiveSessionInformation>
getAllSessions
(Object principal) reactor.core.publisher.Mono<org.springframework.security.core.session.ReactiveSessionInformation>
getSessionInformation
(String sessionId) reactor.core.publisher.Mono<org.springframework.security.core.session.ReactiveSessionInformation>
removeSessionInformation
(String sessionId) reactor.core.publisher.Mono<Void>
saveSessionInformation
(org.springframework.security.core.session.ReactiveSessionInformation information) reactor.core.publisher.Mono<org.springframework.security.core.session.ReactiveSessionInformation>
updateLastAccessTime
(String sessionId)
-
Constructor Details
-
SpringSessionBackedReactiveSessionRegistry
public SpringSessionBackedReactiveSessionRegistry(ReactiveSessionRepository<S> sessionRepository, ReactiveFindByIndexNameSessionRepository<S> indexedSessionRepository)
-
-
Method Details
-
getAllSessions
public reactor.core.publisher.Flux<org.springframework.security.core.session.ReactiveSessionInformation> getAllSessions(Object principal) - Specified by:
getAllSessions
in interfaceorg.springframework.security.core.session.ReactiveSessionRegistry
-
saveSessionInformation
public reactor.core.publisher.Mono<Void> saveSessionInformation(org.springframework.security.core.session.ReactiveSessionInformation information) - Specified by:
saveSessionInformation
in interfaceorg.springframework.security.core.session.ReactiveSessionRegistry
-
getSessionInformation
public reactor.core.publisher.Mono<org.springframework.security.core.session.ReactiveSessionInformation> getSessionInformation(String sessionId) - Specified by:
getSessionInformation
in interfaceorg.springframework.security.core.session.ReactiveSessionRegistry
-
removeSessionInformation
public reactor.core.publisher.Mono<org.springframework.security.core.session.ReactiveSessionInformation> removeSessionInformation(String sessionId) - Specified by:
removeSessionInformation
in interfaceorg.springframework.security.core.session.ReactiveSessionRegistry
-
updateLastAccessTime
public reactor.core.publisher.Mono<org.springframework.security.core.session.ReactiveSessionInformation> updateLastAccessTime(String sessionId) - Specified by:
updateLastAccessTime
in interfaceorg.springframework.security.core.session.ReactiveSessionRegistry
-