AuthenticationHandler has been replaced by the
Authenticator
interface. New authentication handlers
should implement Authenticator. This interface will be removed in
a future release.
@Deprecated public interface AuthenticationHandler
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 choose not
to call the remaining handlers.
The special variant of AuthenticationHandler.Callback.allow(AuthenticationResult)
may be
used by the handler to supply the server with additional information that is
used to set up the session.
Modifier and Type | Interface and Description |
---|---|
static interface |
AuthenticationHandler.Callback
Deprecated.
Single-use callback provided to the
authenticate call. |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(String principal,
Credentials credentials,
SessionDetails sessionDetails,
AuthenticationHandler.Callback callback)
Deprecated.
Request authentication.
|
void authenticate(String principal, Credentials credentials, SessionDetails sessionDetails, AuthenticationHandler.Callback callback)
The server calls this to authenticate new sessions, and when a client
requests the session principal is changed (or example, using
Security.changePrincipal(String, Credentials, Security.ChangePrincipalCallback)
.
For each call to authenticate
, the authentication handler should
respond by calling one of the methods of the provided callback
.
The handler may return immediately and process the authentication request
asynchronously. The client session will be blocked until a callback
method is called.
principal
- the requested principal name, or
Session.ANONYMOUS
if none was suppliedcredentials
- authenticating the principal; for example, a passwordsessionDetails
- the information the server has about the clientcallback
- single use callbackCopyright © 2020 Push Technology Ltd. All Rights Reserved.