Class HttpStatusServerAccessDeniedHandler
java.lang.Object
org.springframework.security.web.server.authorization.HttpStatusServerAccessDeniedHandler
- All Implemented Interfaces:
ServerAccessDeniedHandler
public class HttpStatusServerAccessDeniedHandler
extends Object
implements ServerAccessDeniedHandler
Sets the provided HTTP Status when access is denied.
- Since:
- 5.0
-
Constructor Summary
ConstructorDescriptionHttpStatusServerAccessDeniedHandler
(org.springframework.http.HttpStatus httpStatus) Creates an instance with the provided status -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
handle
(org.springframework.web.server.ServerWebExchange exchange, AccessDeniedException ex)
-
Constructor Details
-
HttpStatusServerAccessDeniedHandler
public HttpStatusServerAccessDeniedHandler(org.springframework.http.HttpStatus httpStatus) Creates an instance with the provided status- Parameters:
httpStatus
- the status to use
-
-
Method Details
-
handle
public reactor.core.publisher.Mono<Void> handle(org.springframework.web.server.ServerWebExchange exchange, AccessDeniedException ex) - Specified by:
handle
in interfaceServerAccessDeniedHandler
-