Package com.linecorp.armeria.server.auth
Interface AuthFailureHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface AuthFailureHandler
A callback which is invoked to handle an authorization failure indicated by
Authorizer
.-
Method Summary
Modifier and Type Method Description HttpResponse
authFailed(HttpService delegate, ServiceRequestContext ctx, HttpRequest req, Throwable cause)
Invoked when the authorization of the specifiedHttpRequest
has failed.
-
Method Details
-
authFailed
HttpResponse authFailed(HttpService delegate, ServiceRequestContext ctx, HttpRequest req, @Nullable Throwable cause) throws ExceptionInvoked when the authorization of the specifiedHttpRequest
has failed.- Parameters:
delegate
- the nextService
in the decoration chainctx
- theServiceRequestContext
req
- theHttpRequest
being handledcause
-null
if theHttpRequest
has been rejected by theAuthorizer
. non-null
if theAuthorizer
raised anException
.- Throws:
Exception
-