public interface AuthenticationControl extends Feature
REGISTER_HANDLER
and
AUTHENTICATE
permissions.
session
as follows:
AuthenticationControl authenticationControl = session.feature(AuthenticationControl.class);
Modifier and Type | Interface and Description |
---|---|
static interface |
AuthenticationControl.ControlAuthenticationHandler
A control authentication handler.
|
Modifier and Type | Method and Description |
---|---|
void |
setAuthenticationHandler(String handlerName,
Set<SessionDetails.DetailType> requestedDetail,
AuthenticationControl.ControlAuthenticationHandler handler)
Register a handler for client authentication events.
|
getSession
void setAuthenticationHandler(String handlerName, Set<SessionDetails.DetailType> requestedDetail, AuthenticationControl.ControlAuthenticationHandler handler) throws IllegalArgumentException, SessionClosedException
Each handler is registered under a particular handlerName
. For
registration to succeed, the server's security configuration must include
a matching <control-authentication-handler/>
entry for the name.
Otherwise registration will fail, the handler will be closed immediately,
and an error will be reported to the session error handler.
Each control session may register a single handler for a
handlerName
. See
ServerHandler.onActive(RegisteredHandler)
.
It is normal for several or all of the control sessions in a control group to set a handler for a given name. Registration will fail if a session in a different control group has registered a handler using the name.
For each authentication event, the server will use its configuration to determine the handler priority order. The server may call authentication handlers in serial or parallel. The server may stop the authentication process as soon as it has an allow or deny response from a handler and all higher priority handlers have abstained.
For a configured control authentication handler, the server will select a
single handler from those registered for the handlerName
. If no
handlers are currently registered, the server will consult the next
handler.
handlerName
- must match an entry in the server's security
configuration for registration to succeedrequestedDetail
- the session details that the server should supply,
if availablehandler
- the authentication handler to setIllegalArgumentException
- if any parameter is nullSessionClosedException
- if the session is closedCopyright © 2016 Push Technology Ltd. All Rights Reserved.