Class SpringSessionBackedReactiveSessionRegistry<S extends Session>

java.lang.Object
org.springframework.session.security.SpringSessionBackedReactiveSessionRegistry<S>
Type Parameters:
S - the Session 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 Details

  • Method Details

    • getAllSessions

      public reactor.core.publisher.Flux<org.springframework.security.core.session.ReactiveSessionInformation> getAllSessions(Object principal)
      Specified by:
      getAllSessions in interface org.springframework.security.core.session.ReactiveSessionRegistry
    • saveSessionInformation

      public reactor.core.publisher.Mono<Void> saveSessionInformation(org.springframework.security.core.session.ReactiveSessionInformation information)
      Specified by:
      saveSessionInformation in interface org.springframework.security.core.session.ReactiveSessionRegistry
    • getSessionInformation

      public reactor.core.publisher.Mono<org.springframework.security.core.session.ReactiveSessionInformation> getSessionInformation(String sessionId)
      Specified by:
      getSessionInformation in interface org.springframework.security.core.session.ReactiveSessionRegistry
    • removeSessionInformation

      public reactor.core.publisher.Mono<org.springframework.security.core.session.ReactiveSessionInformation> removeSessionInformation(String sessionId)
      Specified by:
      removeSessionInformation in interface org.springframework.security.core.session.ReactiveSessionRegistry
    • updateLastAccessTime

      public reactor.core.publisher.Mono<org.springframework.security.core.session.ReactiveSessionInformation> updateLastAccessTime(String sessionId)
      Specified by:
      updateLastAccessTime in interface org.springframework.security.core.session.ReactiveSessionRegistry