@Singleton public class DefaultAuthorizationExceptionHandler extends java.lang.Object implements io.micronaut.http.server.exceptions.ExceptionHandler<AuthorizationException,io.micronaut.http.MutableHttpResponse<?>>
AuthorizationException
.Constructor and Description |
---|
DefaultAuthorizationExceptionHandler()
Deprecated.
This will be removed in the next major version, so that this class uses the ErrorProcessor API
|
DefaultAuthorizationExceptionHandler(RedirectConfiguration redirectConfiguration,
PriorToLoginPersistence priorToLoginPersistence)
Deprecated.
This will be removed in the next major version, so that this class uses the ErrorProcessor API
|
DefaultAuthorizationExceptionHandler(RedirectConfiguration redirectConfiguration,
RedirectService redirectService,
PriorToLoginPersistence priorToLoginPersistence)
Deprecated.
This will be removed in the next major version, so that this class uses the ErrorProcessor API
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getRedirectUri(io.micronaut.http.HttpRequest<?> request,
AuthorizationException exception) |
io.micronaut.http.MutableHttpResponse<?> |
handle(io.micronaut.http.HttpRequest request,
AuthorizationException exception) |
protected io.micronaut.http.MutableHttpResponse<?> |
httpResponseWithStatus(io.micronaut.http.HttpRequest<?> request,
AuthorizationException exception) |
protected io.micronaut.http.MutableHttpResponse<?> |
httpResponseWithStatus(java.net.URI location)
Deprecated.
This will be removed in the next major version, so that this class uses the ErrorProcessor API
|
protected boolean |
shouldRedirect(io.micronaut.http.HttpRequest<?> request,
AuthorizationException exception)
Decides whether the request should be handled with a redirect.
|
@Deprecated public DefaultAuthorizationExceptionHandler()
@Deprecated public DefaultAuthorizationExceptionHandler(RedirectConfiguration redirectConfiguration, @Nullable PriorToLoginPersistence priorToLoginPersistence)
redirectConfiguration
- Redirect configurationpriorToLoginPersistence
- Persistence mechanism to redirect to prior login url@Inject @Deprecated public DefaultAuthorizationExceptionHandler(RedirectConfiguration redirectConfiguration, RedirectService redirectService, @Nullable PriorToLoginPersistence priorToLoginPersistence)
redirectConfiguration
- Redirect configurationredirectService
- Redirection ServicepriorToLoginPersistence
- Persistence mechanism to redirect to prior login urlpublic io.micronaut.http.MutableHttpResponse<?> handle(io.micronaut.http.HttpRequest request, AuthorizationException exception)
handle
in interface io.micronaut.http.server.exceptions.ExceptionHandler<AuthorizationException,io.micronaut.http.MutableHttpResponse<?>>
protected io.micronaut.http.MutableHttpResponse<?> httpResponseWithStatus(io.micronaut.http.HttpRequest<?> request, AuthorizationException exception)
request
- The requestexception
- The exceptionprotected boolean shouldRedirect(io.micronaut.http.HttpRequest<?> request, AuthorizationException exception)
request
- The HTTP Requestexception
- The authorization exceptionprotected java.lang.String getRedirectUri(io.micronaut.http.HttpRequest<?> request, AuthorizationException exception)
request
- The requestexception
- The exception@Deprecated protected io.micronaut.http.MutableHttpResponse<?> httpResponseWithStatus(java.net.URI location)
location
- The Uri to redirect to