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) @Produces @Singleton public class OauthErrorResponseExceptionHandler extends java.lang.Object implements io.micronaut.http.server.exceptions.ExceptionHandler<OauthErrorResponseException,io.micronaut.http.MutableHttpResponse<?>>
Returns an application/json response for aOauthErrorResponseExceptionwith status 400.- Since:
- 2.0.0
- See Also:
- OAuth 2.0 Error Response
-
-
Constructor Summary
Constructors Constructor Description OauthErrorResponseExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.micronaut.http.MutableHttpResponse<?>handle(io.micronaut.http.HttpRequest request, OauthErrorResponseException exception)protected java.util.Map<java.lang.String,java.lang.Object>responseBody(ErrorResponse errorResponse)
-
-
-
Method Detail
-
handle
public io.micronaut.http.MutableHttpResponse<?> handle(io.micronaut.http.HttpRequest request, OauthErrorResponseException exception)- Specified by:
handlein interfaceio.micronaut.http.server.exceptions.ExceptionHandler<OauthErrorResponseException,io.micronaut.http.MutableHttpResponse<?>>
-
responseBody
protected java.util.Map<java.lang.String,java.lang.Object> responseBody(ErrorResponse errorResponse)
- Parameters:
errorResponse- Error Response- Returns:
- A Map which will be serialized as the body of the HTTP response
-
-