Class SecurityContextServerLogoutHandler
- java.lang.Object
-
- org.springframework.security.web.server.authentication.logout.SecurityContextServerLogoutHandler
-
- All Implemented Interfaces:
ServerLogoutHandler
public class SecurityContextServerLogoutHandler extends java.lang.Object implements ServerLogoutHandler
AServerLogoutHandler
which removes the SecurityContext using the providedServerSecurityContextRepository
- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description SecurityContextServerLogoutHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<java.lang.Void>
logout(WebFilterExchange exchange, Authentication authentication)
Invoked when log out is requestedvoid
setSecurityContextRepository(ServerSecurityContextRepository securityContextRepository)
Sets theServerSecurityContextRepository
that should be used for logging out.
-
-
-
Method Detail
-
logout
public reactor.core.publisher.Mono<java.lang.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
public void setSecurityContextRepository(ServerSecurityContextRepository securityContextRepository)
Sets theServerSecurityContextRepository
that should be used for logging out. Default isWebSessionServerSecurityContextRepository
- Parameters:
securityContextRepository
- theServerSecurityContextRepository
to use.
-
-