Package io.micronaut.security.errors
Class OauthErrorResponseExceptionHandler
java.lang.Object
io.micronaut.security.errors.OauthErrorResponseExceptionHandler
- All Implemented Interfaces:
io.micronaut.http.server.exceptions.ExceptionHandler<OauthErrorResponseException,
io.micronaut.http.MutableHttpResponse<?>>
@Requires(classes={OauthErrorResponseException.class,io.micronaut.http.server.exceptions.ExceptionHandler.class})
@Produces
@Singleton
public class OauthErrorResponseExceptionHandler
extends Object
implements io.micronaut.http.server.exceptions.ExceptionHandler<OauthErrorResponseException,io.micronaut.http.MutableHttpResponse<?>>
Returns an application/json response for a
OauthErrorResponseException
with status 400.- Since:
- 2.0.0
- Author:
- sdelamo
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.http.MutableHttpResponse<?>
handle
(io.micronaut.http.HttpRequest request, OauthErrorResponseException exception) responseBody
(ErrorResponse errorResponse)
-
Constructor Details
-
OauthErrorResponseExceptionHandler
public OauthErrorResponseExceptionHandler()
-
-
Method Details
-
handle
public io.micronaut.http.MutableHttpResponse<?> handle(io.micronaut.http.HttpRequest request, OauthErrorResponseException exception) - Specified by:
handle
in interfaceio.micronaut.http.server.exceptions.ExceptionHandler<OauthErrorResponseException,
io.micronaut.http.MutableHttpResponse<?>>
-
responseBody
- Parameters:
errorResponse
- Error Response- Returns:
- A Map which will be serialized as the body of the HTTP response
-