Package org.springframework.security.web.server.authentication.logout

# Class LogoutWebFilter

java.lang.Object
org.springframework.security.web.server.authentication.logout.LogoutWebFilter

All Implemented Interfaces:
  `org.springframework.web.server.WebFilter`

public class LogoutWebFilter extends Object implements org.springframework.web.server.WebFilter
If the request matches, logs an authenticated user out by delegating to a `ServerLogoutHandler`.

Since:
  5.0

## Constructor Summary

Constructors
Constructor
Description
`LogoutWebFilter()`

## Method Summary

Modifier and Type
Method
Description
`reactor.core.publisher.Mono<Void>`
`filter(org.springframework.web.server.ServerWebExchange exchange, org.springframework.web.server.WebFilterChain chain)`
`void`
`setLogoutHandler(ServerLogoutHandler logoutHandler)`
Sets the `ServerLogoutHandler`.
`void`
`setLogoutSuccessHandler(ServerLogoutSuccessHandler logoutSuccessHandler)`
Sets the `ServerLogoutSuccessHandler`.
`void`
`setRequiresLogoutMatcher(ServerWebExchangeMatcher requiresLogoutMatcher)`

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

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

## Constructor Details

### LogoutWebFilter

public LogoutWebFilter()

## Method Details

### filter

public reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, org.springframework.web.server.WebFilterChain chain)

Specified by:
  `filter` in interface `org.springframework.web.server.WebFilter`

### setLogoutSuccessHandler

public void setLogoutSuccessHandler(ServerLogoutSuccessHandler logoutSuccessHandler)
Sets the `ServerLogoutSuccessHandler`. The default is `RedirectServerLogoutSuccessHandler`.

Parameters:
  `logoutSuccessHandler` - the handler to use

### setLogoutHandler

public void setLogoutHandler(ServerLogoutHandler logoutHandler)
Sets the `ServerLogoutHandler`. The default is `SecurityContextServerLogoutHandler`.

Parameters:
  `logoutHandler` - The handler to use

### setRequiresLogoutMatcher

public void setRequiresLogoutMatcher(ServerWebExchangeMatcher requiresLogoutMatcher)