@Singleton public class AuthorizationErrorResponseExceptionHandler extends java.lang.Object implements io.micronaut.http.server.exceptions.ExceptionHandler<AuthorizationErrorResponseException,io.micronaut.http.MutableHttpResponse<?>>
AuthorizationErrorResponseException
.Constructor and Description |
---|
AuthorizationErrorResponseExceptionHandler()
Deprecated.
This will be removed in the next major version, so that this class uses the ErrorProcessor API
|
AuthorizationErrorResponseExceptionHandler(RedirectConfiguration redirectConfiguration,
RedirectService redirectService,
io.micronaut.http.server.exceptions.response.ErrorResponseProcessor<?> errorResponseProcessor) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getRedirectUri(io.micronaut.http.HttpRequest<?> request,
AuthorizationErrorResponseException exception) |
io.micronaut.http.MutableHttpResponse<?> |
handle(io.micronaut.http.HttpRequest request,
AuthorizationErrorResponseException exception) |
protected io.micronaut.http.MutableHttpResponse<?> |
httpResponseWithStatus(io.micronaut.http.HttpRequest<?> request,
AuthorizationErrorResponseException exception) |
protected io.micronaut.http.MutableHttpResponse<?> |
httpResponseWithStatus(java.net.URI location)
Builds a HTTP Response redirection to the supplied location.
|
protected boolean |
shouldRedirect(io.micronaut.http.HttpRequest<?> request,
AuthorizationErrorResponseException exception)
Decides whether the request should be handled with a redirect.
|
@Inject public AuthorizationErrorResponseExceptionHandler(@Nullable RedirectConfiguration redirectConfiguration, @Nullable RedirectService redirectService, @Nullable io.micronaut.http.server.exceptions.response.ErrorResponseProcessor<?> errorResponseProcessor)
redirectConfiguration
- Redirect ConfigurationredirectService
- Redirect ServiceerrorResponseProcessor
- Error Response Processor@Deprecated public AuthorizationErrorResponseExceptionHandler()
public io.micronaut.http.MutableHttpResponse<?> handle(io.micronaut.http.HttpRequest request, AuthorizationErrorResponseException exception)
handle
in interface io.micronaut.http.server.exceptions.ExceptionHandler<AuthorizationErrorResponseException,io.micronaut.http.MutableHttpResponse<?>>
@NonNull protected io.micronaut.http.MutableHttpResponse<?> httpResponseWithStatus(@NonNull java.net.URI location)
location
- The Uri to redirect to@NonNull protected io.micronaut.http.MutableHttpResponse<?> httpResponseWithStatus(@NonNull io.micronaut.http.HttpRequest<?> request, @NonNull AuthorizationErrorResponseException exception)
request
- The requestexception
- The exception@NonNull protected java.lang.String getRedirectUri(@NonNull io.micronaut.http.HttpRequest<?> request, @NonNull AuthorizationErrorResponseException exception)
request
- The requestexception
- The exceptionprotected boolean shouldRedirect(@NonNull io.micronaut.http.HttpRequest<?> request, @NonNull AuthorizationErrorResponseException exception)
request
- The HTTP Requestexception
- The authorization exception