Package org.springframework.security.web.server.csrf

# Class CsrfServerLogoutHandler

java.lang.Object
org.springframework.security.web.server.csrf.CsrfServerLogoutHandler

All Implemented Interfaces:
  `ServerLogoutHandler`

public class CsrfServerLogoutHandler extends Object implements 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

Constructors
Constructor
Description
`CsrfServerLogoutHandler(ServerCsrfTokenRepository csrfTokenRepository)`
Creates a new instance

## Method Summary

Modifier and Type
Method
Description
`reactor.core.publisher.Mono<Void>`
`logout(WebFilterExchange exchange, org.springframework.security.core.Authentication authentication)`
Clears the `CsrfToken`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CsrfServerLogoutHandler

public CsrfServerLogoutHandler(ServerCsrfTokenRepository csrfTokenRepository)
Creates a new instance

Parameters:
  `csrfTokenRepository` - The `ServerCsrfTokenRepository` to use

## Method Details

### logout

public reactor.core.publisher.Mono<Void> logout(WebFilterExchange exchange, org.springframework.security.core.Authentication authentication)
Clears the `CsrfToken`

Specified by:
  `logout` in interface `ServerLogoutHandler`
Parameters:
  `exchange` - the exchange
  `authentication` - the `Authentication`
Returns:
  A completion notification (success or error)