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 Details

    • OauthErrorResponseExceptionHandler

      public OauthErrorResponseExceptionHandler()
  • Method Details

    • handle

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

      protected Map<String,Object> responseBody(ErrorResponse errorResponse)
      Parameters:
      errorResponse - Error Response
      Returns:
      A Map which will be serialized as the body of the HTTP response