Class CsrfServerLogoutHandler
- java.lang.Object
-
- org.springframework.security.web.server.csrf.CsrfServerLogoutHandler
-
- All Implemented Interfaces:
ServerLogoutHandler
public class CsrfServerLogoutHandler extends java.lang.Object implements ServerLogoutHandler
CsrfServerLogoutHandleris in charge of removing theCsrfTokenupon logout. A newCsrfTokenwill then be generated by the framework upon the next request.- Since:
- 5.1
-
-
Constructor Summary
Constructors Constructor Description CsrfServerLogoutHandler(ServerCsrfTokenRepository csrfTokenRepository)Creates a new instance
-
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)Clears theCsrfToken
-
-
-
Constructor Detail
-
CsrfServerLogoutHandler
public CsrfServerLogoutHandler(ServerCsrfTokenRepository csrfTokenRepository)
Creates a new instance- Parameters:
csrfTokenRepository- TheServerCsrfTokenRepositoryto use
-
-
Method Detail
-
logout
public reactor.core.publisher.Mono<java.lang.Void> logout(WebFilterExchange exchange, Authentication authentication)
Clears theCsrfToken- Specified by:
logoutin interfaceServerLogoutHandler- Parameters:
exchange- the exchangeauthentication- theAuthentication- Returns:
- A completion notification (success or error)
-
-