Class NoOpServerSecurityContextRepository
- java.lang.Object
-
- org.springframework.security.web.server.context.NoOpServerSecurityContextRepository
-
- All Implemented Interfaces:
ServerSecurityContextRepository
public final class NoOpServerSecurityContextRepository extends java.lang.Object implements ServerSecurityContextRepository
A do nothing implementation ofServerSecurityContextRepository
. Used in stateless applications.- Since:
- 5.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NoOpServerSecurityContextRepository
getInstance()
reactor.core.publisher.Mono<SecurityContext>
load(org.springframework.web.server.ServerWebExchange exchange)
Loads the SecurityContext associated with theServerWebExchange
reactor.core.publisher.Mono<java.lang.Void>
save(org.springframework.web.server.ServerWebExchange exchange, SecurityContext context)
Saves the SecurityContext
-
-
-
Method Detail
-
save
public reactor.core.publisher.Mono<java.lang.Void> save(org.springframework.web.server.ServerWebExchange exchange, SecurityContext context)
Description copied from interface:ServerSecurityContextRepository
Saves the SecurityContext- Specified by:
save
in interfaceServerSecurityContextRepository
- Parameters:
exchange
- the exchange to associate to the SecurityContextcontext
- the SecurityContext to save- Returns:
- a completion notification (success or error)
-
load
public reactor.core.publisher.Mono<SecurityContext> load(org.springframework.web.server.ServerWebExchange exchange)
Description copied from interface:ServerSecurityContextRepository
Loads the SecurityContext associated with theServerWebExchange
- Specified by:
load
in interfaceServerSecurityContextRepository
- Parameters:
exchange
- the exchange to look up theSecurityContext
- Returns:
- the
SecurityContext
to lookup or empty if not found. Never null
-
getInstance
public static NoOpServerSecurityContextRepository getInstance()
-
-