Package org.springframework.security.web.server

# Class ExchangeMatcherRedirectWebFilter

java.lang.Object
org.springframework.security.web.server.ExchangeMatcherRedirectWebFilter

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

public final class ExchangeMatcherRedirectWebFilter extends Object implements org.springframework.web.server.WebFilter
Web filter that redirects requests that match `ServerWebExchangeMatcher` to the specified URL.

Since:
  5.6

## Constructor Summary

Constructors
Constructor
Description
`ExchangeMatcherRedirectWebFilter(ServerWebExchangeMatcher exchangeMatcher, String redirectUrl)`
Create and initialize an instance of the web filter.

## 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)`

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

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

## Constructor Details

### ExchangeMatcherRedirectWebFilter

public ExchangeMatcherRedirectWebFilter(ServerWebExchangeMatcher exchangeMatcher, String redirectUrl)
Create and initialize an instance of the web filter.

Parameters:
  `exchangeMatcher` - the exchange matcher
  `redirectUrl` - the redirect URL

## 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`