Class AuthenticationExceptionHandler
- java.lang.Object
-
- io.micronaut.security.authentication.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 anAuthenticationExceptionis 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)Deprecated.This will be removed in the next major version, so that this class uses the ErrorProcessor API
-
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)
-
-
-
Constructor Detail
-
AuthenticationExceptionHandler
@Deprecated public AuthenticationExceptionHandler(io.micronaut.context.event.ApplicationEventPublisher<?> eventPublisher)
Deprecated.This will be removed in the next major version, so that this class uses the ErrorProcessor API- Parameters:
eventPublisher- The event publisher
-
-
Method Detail
-
handle
public io.micronaut.http.MutableHttpResponse<?> handle(io.micronaut.http.HttpRequest request, AuthenticationException exception)- Specified by:
handlein interfaceio.micronaut.http.server.exceptions.ExceptionHandler<AuthenticationException,io.micronaut.http.MutableHttpResponse<?>>
-
-