Class NoOpServerSecurityContextRepository

java.lang.Object
org.springframework.security.web.server.context.NoOpServerSecurityContextRepository
All Implemented Interfaces:
ServerSecurityContextRepository

public final class NoOpServerSecurityContextRepository extends Object implements ServerSecurityContextRepository
A do nothing implementation of ServerSecurityContextRepository. Used in stateless applications.
Since:
5.0
  • Method Summary

    Modifier and Type
    Method
    Description
     
    reactor.core.publisher.Mono<org.springframework.security.core.context.SecurityContext>
    load(org.springframework.web.server.ServerWebExchange exchange)
    Loads the SecurityContext associated with the ServerWebExchange
    reactor.core.publisher.Mono<Void>
    save(org.springframework.web.server.ServerWebExchange exchange, org.springframework.security.core.context.SecurityContext context)
    Saves the SecurityContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • save

      public reactor.core.publisher.Mono<Void> save(org.springframework.web.server.ServerWebExchange exchange, org.springframework.security.core.context.SecurityContext context)
      Description copied from interface: ServerSecurityContextRepository
      Saves the SecurityContext
      Specified by:
      save in interface ServerSecurityContextRepository
      Parameters:
      exchange - the exchange to associate to the SecurityContext
      context - the SecurityContext to save
      Returns:
      a completion notification (success or error)
    • load

      public reactor.core.publisher.Mono<org.springframework.security.core.context.SecurityContext> load(org.springframework.web.server.ServerWebExchange exchange)
      Description copied from interface: ServerSecurityContextRepository
      Loads the SecurityContext associated with the ServerWebExchange
      Specified by:
      load in interface ServerSecurityContextRepository
      Parameters:
      exchange - the exchange to look up the SecurityContext
      Returns:
      the SecurityContext to lookup or empty if not found. Never null
    • getInstance

      public static NoOpServerSecurityContextRepository getInstance()