Class SecurityContextServerLogoutHandler
java.lang.Object
org.springframework.security.web.server.authentication.logout.SecurityContextServerLogoutHandler
- All Implemented Interfaces:
ServerLogoutHandler
A
ServerLogoutHandler
which removes the SecurityContext using the provided
ServerSecurityContextRepository
- Since:
- 5.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
logout
(WebFilterExchange exchange, Authentication authentication) Invoked when log out is requestedvoid
setSecurityContextRepository
(ServerSecurityContextRepository securityContextRepository) Sets theServerSecurityContextRepository
that should be used for logging out.
-
Constructor Details
-
SecurityContextServerLogoutHandler
public SecurityContextServerLogoutHandler()
-
-
Method Details
-
logout
public reactor.core.publisher.Mono<Void> logout(WebFilterExchange exchange, Authentication authentication) Description copied from interface:ServerLogoutHandler
Invoked when log out is requested- Specified by:
logout
in interfaceServerLogoutHandler
- Parameters:
exchange
- the exchangeauthentication
- theAuthentication
- Returns:
- a completion notification (success or error)
-
setSecurityContextRepository
Sets theServerSecurityContextRepository
that should be used for logging out. Default isWebSessionServerSecurityContextRepository
- Parameters:
securityContextRepository
- theServerSecurityContextRepository
to use.
-