Package io.micronaut.security.handlers
Class HttpStatusCodeRejectionHandler
- java.lang.Object
-
- io.micronaut.security.handlers.HttpStatusCodeRejectionHandler
-
- All Implemented Interfaces:
RejectionHandler
@Primary @Singleton public class HttpStatusCodeRejectionHandler extends java.lang.Object implements RejectionHandler
Handles the rejection of route bySecurityFilter
with the response of correspondent HTTP Status coded.- Since:
- 1.0
- Author:
- Sergio del Amo
-
-
Constructor Summary
Constructors Constructor Description HttpStatusCodeRejectionHandler()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>
reject(io.micronaut.http.HttpRequest<?> request, boolean forbidden)
-
-
-
Method Detail
-
reject
public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> reject(io.micronaut.http.HttpRequest<?> request, boolean forbidden)
- Specified by:
reject
in interfaceRejectionHandler
- Parameters:
request
-HttpRequest
being processedforbidden
- if true indicates that although the user was authenticated, he did not have the necessary access privileges.- Returns:
- Return a HTTP Response
-
-