Class HttpStatusCodeRejectionHandler

  • All Implemented Interfaces:
    RejectionHandler

    @Primary
    @Singleton
    public class HttpStatusCodeRejectionHandler
    extends java.lang.Object
    implements RejectionHandler
    Handles the rejection of route by SecurityFilter with the response of correspondent HTTP Status coded.
    Since:
    1.0
    Author:
    Sergio del Amo
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpStatusCodeRejectionHandler

        public HttpStatusCodeRejectionHandler()
        Constructor.
    • Method Detail

      • reject

        public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> reject​(io.micronaut.http.HttpRequest<?> request,
                                                                                              boolean forbidden)
        Specified by:
        reject in interface RejectionHandler
        Parameters:
        request - HttpRequest being processed
        forbidden - if true indicates that although the user was authenticated, he did not have the necessary access privileges.
        Returns:
        Return a HTTP Response