Class CsrfServerLogoutHandler
java.lang.Object
org.springframework.security.web.server.csrf.CsrfServerLogoutHandler
- All Implemented Interfaces:
ServerLogoutHandler
CsrfServerLogoutHandler
is in charge of removing the CsrfToken
upon
logout. A new CsrfToken
will then be generated by the framework upon the next
request.- Since:
- 5.1
-
Constructor Summary
ConstructorDescriptionCsrfServerLogoutHandler
(ServerCsrfTokenRepository csrfTokenRepository) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
logout
(WebFilterExchange exchange, Authentication authentication) Clears theCsrfToken
-
Constructor Details
-
CsrfServerLogoutHandler
Creates a new instance- Parameters:
csrfTokenRepository
- TheServerCsrfTokenRepository
to use
-
-
Method Details
-
logout
public reactor.core.publisher.Mono<Void> logout(WebFilterExchange exchange, Authentication authentication) Clears theCsrfToken
- Specified by:
logout
in interfaceServerLogoutHandler
- Parameters:
exchange
- the exchangeauthentication
- theAuthentication
- Returns:
- A completion notification (success or error)
-