Class HttpStatusExchangeRejectedHandler
- java.lang.Object
-
- org.springframework.security.web.server.firewall.HttpStatusExchangeRejectedHandler
-
- All Implemented Interfaces:
ServerExchangeRejectedHandler
public class HttpStatusExchangeRejectedHandler extends java.lang.Object implements ServerExchangeRejectedHandler
A simple implementation ofServerExchangeRejectedHandler
that sends an error with configurable status code.- Since:
- 5.7.13
-
-
Constructor Summary
Constructors Constructor Description HttpStatusExchangeRejectedHandler()
Constructs an instance which uses400
as response code.HttpStatusExchangeRejectedHandler(org.springframework.http.HttpStatus status)
Constructs an instance which uses a configurable http code as response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<java.lang.Void>
handle(org.springframework.web.server.ServerWebExchange exchange, ServerExchangeRejectedException serverExchangeRejectedException)
Handles an request rejected failure.
-
-
-
Constructor Detail
-
HttpStatusExchangeRejectedHandler
public HttpStatusExchangeRejectedHandler()
Constructs an instance which uses400
as response code.
-
HttpStatusExchangeRejectedHandler
public HttpStatusExchangeRejectedHandler(org.springframework.http.HttpStatus status)
Constructs an instance which uses a configurable http code as response.- Parameters:
status
- http status code to use
-
-
Method Detail
-
handle
public reactor.core.publisher.Mono<java.lang.Void> handle(org.springframework.web.server.ServerWebExchange exchange, ServerExchangeRejectedException serverExchangeRejectedException)
Description copied from interface:ServerExchangeRejectedHandler
Handles an request rejected failure.- Specified by:
handle
in interfaceServerExchangeRejectedHandler
- Parameters:
exchange
- theServerWebExchange
that was rejectedserverExchangeRejectedException
- that caused the invocation
-
-