public static interface AuthenticationHandler.Callback
authenticate
call.
The server calls the handlers for each authentication request. Each
handler must respond allow
, abstain
,
or deny
. The special allow(AuthenticationResult)
variant is provided if the handler wants to return additional
information.
Authentication handlers are configured in precedence order. Authentication will succeed if a handler returns "allow" and all higher precedence handlers (earlier in the order) return "abstain". Authentication will fail if a handler returns "deny" and all higher precedence handlers return "abstain". If all authentication handlers return "abstain", the request will be denied. Once the outcome is known, the server may chose not to call the remaining handlers.
Modifier and Type | Method and Description |
---|---|
void |
abstain()
The authentication has neither passed nor failed.
|
void |
allow()
Authentication passed - allow the authentication request.
|
void |
allow(AuthenticationResult result)
Authentication passed - allow the authentication request with
additional information provided relating to the session (e.g.
|
void |
deny()
Authentication failed - deny the authentication request.
|
void allow()
IllegalStateException
- if another method has already been
invoked on this callbackvoid allow(AuthenticationResult result)
result
- additional information for the sessionIllegalStateException
- if another method has already been
invoked on this callbackIllegalArgumentException
- if result
is nullvoid abstain()
IllegalStateException
- if another method has already been
invoked on this callbackvoid deny()
IllegalStateException
- if another method has already been
invoked on this callbackCopyright © 2016 Push Technology Ltd. All Rights Reserved.