A LoginAuthenticator that uses SPNEGO and the GSS API to authenticate requests.
A successful authentication from a client is cached for a configurable
duration using the HTTP session; this avoids
that the client is asked to authenticate for every request.
SPNEGOLoginService
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private Duration | |
| private final String | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SPNEGOAuthenticator(String
the authenticator name type)Allow for a custom name value to be set for instances where SPNEGO may not be appropriate |
| Modifier and Type | Method and Description |
|---|---|
| public Duration | |
| public String | |
| private String | |
| public UserIdentity | login(String
the username of the client to be authenticated username, Object the user's credential password, Request the inbound request that needs authentication request, Response response)Overrides org. Only renew the session id if the user has been fully authenticated, don't renew the session for any of the intermediate request/response handshakes. |
| private void | |
| public void | setAuthenticationDuration(Duration
the authentication duration authenticationDuration)Sets the duration of the authentication. |
| private void | |
| public AuthenticationState | validateRequest(Request
The request req, Response The response res, Callback the callback to use for writing a response callback)Implements org. Validate a request |
| _authenticationDuration | back to summary |
|---|---|
| private Duration _authenticationDuration | |
| _type | back to summary |
|---|---|
| private final String _type | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG Hides org. | |
| SPNEGOAuthenticator | back to summary |
|---|---|
| public SPNEGOAuthenticator() | |
| SPNEGOAuthenticator | back to summary |
|---|---|
| public SPNEGOAuthenticator(String type) Allow for a custom name value to be set for instances where SPNEGO may not be appropriate
| |
| getAuthenticationDuration | back to summary |
|---|---|
| public Duration getAuthenticationDuration() Get the authentication duration.
| |
| getAuthenticationType | back to summary |
|---|---|
| public String getAuthenticationType() Implements org.
| |
| getSpnegoToken | back to summary |
|---|---|
| private String getSpnegoToken(String header) | |
| login | back to summary |
|---|---|
| public UserIdentity login(String username, Object password, Request request, Response response) Overrides org. Only renew the session id if the user has been fully authenticated, don't renew the session for any of the intermediate request/response handshakes.
| |
| sendChallenge | back to summary |
|---|---|
| private void sendChallenge(Request req, Response res, Callback callback, String token) | |
| setAuthenticationDuration | back to summary |
|---|---|
| public void setAuthenticationDuration(Duration authenticationDuration) Sets the duration of the authentication. A negative duration means that the authentication is only valid for the current request. A zero duration means that the authentication is valid forever. A positive value means that the authentication is valid for the specified duration.
| |
| setSpnegoToken | back to summary |
|---|---|
| private void setSpnegoToken(Response response, String token) | |
| validateRequest | back to summary |
|---|---|
| public AuthenticationState validateRequest(Request req, Response res, Callback callback) throws ServerAuthException Implements org. Doc from org. Validate a request
| |
| Modifier and Type | Field and Description |
|---|---|
| private final transient UserIdentity | |
| private final transient Instant | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| private |
| _userIdentity | back to summary |
|---|---|
| private final transient UserIdentity _userIdentity | |
| _validFrom | back to summary |
|---|---|
| private final transient Instant _validFrom | |
| ATTRIBUTE | back to summary |
|---|---|
| private static final String ATTRIBUTE | |
| UserIdentityHolder | back to summary |
|---|---|
| private UserIdentityHolder(UserIdentity userIdentity) | |