Class WebFilterChainProxy
java.lang.Object
org.springframework.security.web.server.WebFilterChainProxy
- All Implemented Interfaces:
org.springframework.web.server.WebFilter
Used to delegate to a List of
SecurityWebFilterChain
instances.- Since:
- 5.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
AWebFilterChainProxy.WebFilterChainDecorator
that uses theDefaultWebFilterChain
static interface
A strategy for decorating the provided filter chain with one that accounts for theSecurityFilterChain
for a given request. -
Constructor Summary
ConstructorsConstructorDescriptionWebFilterChainProxy
(List<SecurityWebFilterChain> filters) WebFilterChainProxy
(SecurityWebFilterChain... filters) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
filter
(org.springframework.web.server.ServerWebExchange exchange, org.springframework.web.server.WebFilterChain chain) void
setExchangeRejectedHandler
(ServerExchangeRejectedHandler exchangeRejectedHandler) HandlesServerExchangeRejectedException
when theServerWebExchangeFirewall
rejects the providedServerWebExchange
.void
setFilterChainDecorator
(WebFilterChainProxy.WebFilterChainDecorator filterChainDecorator) Used to decorate the originalWebFilterChain
for each requestvoid
setFirewall
(ServerWebExchangeFirewall firewall) Protects the application using the providedStrictServerWebExchangeFirewall
.
-
Constructor Details
-
WebFilterChainProxy
-
WebFilterChainProxy
-
-
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 interfaceorg.springframework.web.server.WebFilter
-
setFirewall
Protects the application using the providedStrictServerWebExchangeFirewall
.- Parameters:
firewall
- theStrictServerWebExchangeFirewall
to use. Cannot be null.- Since:
- 6.4
-
setExchangeRejectedHandler
HandlesServerExchangeRejectedException
when theServerWebExchangeFirewall
rejects the providedServerWebExchange
.- Parameters:
exchangeRejectedHandler
- theServerExchangeRejectedHandler
to use.
-
setFilterChainDecorator
public void setFilterChainDecorator(WebFilterChainProxy.WebFilterChainDecorator filterChainDecorator) Used to decorate the originalWebFilterChain
for each requestBy default, this decorates the filter chain with a
DefaultWebFilterChain
that iterates through security filters and then delegates to the original chain- Parameters:
filterChainDecorator
- the strategy for constructing the filter chain- Since:
- 6.0
-