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
CsrfServerLogoutHandler
is in charge of removing theCsrfToken
upon logout. A newCsrfToken
will 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
- TheServerCsrfTokenRepository
to use
-
-
Method Detail
-
logout
public reactor.core.publisher.Mono<java.lang.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)
-
-