Class AuthenticationExceptionHandler

  • All Implemented Interfaces:
    io.micronaut.http.server.exceptions.ExceptionHandler<AuthenticationException,​io.micronaut.http.MutableHttpResponse<?>>

    @Singleton
    @Primary
    @Produces
    public class AuthenticationExceptionHandler
    extends java.lang.Object
    implements io.micronaut.http.server.exceptions.ExceptionHandler<AuthenticationException,​io.micronaut.http.MutableHttpResponse<?>>
    Handles the server response when an AuthenticationException is thrown.
    Since:
    1.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected io.micronaut.context.event.ApplicationEventPublisher<?> eventPublisher  
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthenticationExceptionHandler​(io.micronaut.context.event.ApplicationEventPublisher<?> eventPublisher)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.micronaut.http.MutableHttpResponse<?> handle​(io.micronaut.http.HttpRequest request, AuthenticationException exception)  
      • Methods inherited from class java.lang.Object

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

      • eventPublisher

        protected final io.micronaut.context.event.ApplicationEventPublisher<?> eventPublisher
    • Constructor Detail

      • AuthenticationExceptionHandler

        public AuthenticationExceptionHandler​(io.micronaut.context.event.ApplicationEventPublisher<?> eventPublisher)
    • Method Detail

      • handle

        public io.micronaut.http.MutableHttpResponse<?> handle​(io.micronaut.http.HttpRequest request,
                                                               AuthenticationException exception)
        Specified by:
        handle in interface io.micronaut.http.server.exceptions.ExceptionHandler<AuthenticationException,​io.micronaut.http.MutableHttpResponse<?>>