Class ServerWebExchangeDelegatingServerAccessDeniedHandler
java.lang.Object
org.springframework.security.web.server.authorization.ServerWebExchangeDelegatingServerAccessDeniedHandler
- All Implemented Interfaces:
ServerAccessDeniedHandler
public class ServerWebExchangeDelegatingServerAccessDeniedHandler
extends Object
implements ServerAccessDeniedHandler
A
ServerAccessDeniedHandler
which delegates to multiple
ServerAccessDeniedHandler
s based on a ServerWebExchangeMatcher
- Since:
- 5.1
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Constructor Summary
ConstructorDescriptionServerWebExchangeDelegatingServerAccessDeniedHandler
(List<ServerWebExchangeDelegatingServerAccessDeniedHandler.DelegateEntry> handlers) Creates a new instanceServerWebExchangeDelegatingServerAccessDeniedHandler
(ServerWebExchangeDelegatingServerAccessDeniedHandler.DelegateEntry... handlers) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
handle
(org.springframework.web.server.ServerWebExchange exchange, AccessDeniedException denied) void
setDefaultAccessDeniedHandler
(ServerAccessDeniedHandler accessDeniedHandler) Use thisServerAccessDeniedHandler
when noServerWebExchangeMatcher
matches.
-
Constructor Details
-
ServerWebExchangeDelegatingServerAccessDeniedHandler
public ServerWebExchangeDelegatingServerAccessDeniedHandler(ServerWebExchangeDelegatingServerAccessDeniedHandler.DelegateEntry... handlers) Creates a new instance- Parameters:
handlers
- a list ofServerWebExchangeMatcher
/ServerAccessDeniedHandler
pairs that should be used. Each is considered in the order they are specified and only the firstServerAccessDeniedHandler
is used. If none match, then the defaultServerAccessDeniedHandler
is used.
-
ServerWebExchangeDelegatingServerAccessDeniedHandler
public ServerWebExchangeDelegatingServerAccessDeniedHandler(List<ServerWebExchangeDelegatingServerAccessDeniedHandler.DelegateEntry> handlers) Creates a new instance- Parameters:
handlers
- a list ofServerWebExchangeMatcher
/ServerAccessDeniedHandler
pairs that should be used. Each is considered in the order they are specified and only the firstServerAccessDeniedHandler
is used. If none match, then the defaultServerAccessDeniedHandler
is used.
-
-
Method Details
-
handle
public reactor.core.publisher.Mono<Void> handle(org.springframework.web.server.ServerWebExchange exchange, AccessDeniedException denied) - Specified by:
handle
in interfaceServerAccessDeniedHandler
-
setDefaultAccessDeniedHandler
Use thisServerAccessDeniedHandler
when noServerWebExchangeMatcher
matches.- Parameters:
accessDeniedHandler
- - the defaultServerAccessDeniedHandler
to use
-