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 TypeMethodDescriptionreactor.core.publisher.Mono<SecurityContext>
load
(org.springframework.web.server.ServerWebExchange exchange) Loads the SecurityContext associated with theServerWebExchange
reactor.core.publisher.Mono<Void>
save
(org.springframework.web.server.ServerWebExchange exchange, SecurityContext context) Saves the SecurityContext
-
Method Details
-
save
public reactor.core.publisher.Mono<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
-