AuthenticationMechanismpublic class GenericHeaderAuthenticationMechanism extends java.lang.Object implements AuthenticationMechanism
| Modifier and Type | Class | Description |
|---|---|---|
static class |
GenericHeaderAuthenticationMechanism.Factory |
AuthenticationMechanism.AuthenticationMechanismOutcome, AuthenticationMechanism.ChallengeResult| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
IDENTITY_HEADER |
|
static java.lang.String |
NAME |
|
static java.lang.String |
SESSION_HEADER |
| Constructor | Description |
|---|---|
GenericHeaderAuthenticationMechanism(java.lang.String mechanismName,
java.util.List<HttpString> identityHeaders,
java.util.List<java.lang.String> sessionCookieNames,
IdentityManager identityManager) |
| Modifier and Type | Method | Description |
|---|---|---|
AuthenticationMechanism.AuthenticationMechanismOutcome |
authenticate(HttpServerExchange exchange,
SecurityContext securityContext) |
Perform authentication of the request.
|
AuthenticationMechanism.ChallengeResult |
sendChallenge(HttpServerExchange exchange,
SecurityContext securityContext) |
Send an authentication challenge to the remote client.
|
public static final java.lang.String NAME
public static final java.lang.String IDENTITY_HEADER
public static final java.lang.String SESSION_HEADER
public GenericHeaderAuthenticationMechanism(java.lang.String mechanismName,
java.util.List<HttpString> identityHeaders,
java.util.List<java.lang.String> sessionCookieNames,
IdentityManager identityManager)
public AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext)
AuthenticationMechanismauthenticate in interface AuthenticationMechanismexchange - The exchangepublic AuthenticationMechanism.ChallengeResult sendChallenge(HttpServerExchange exchange, SecurityContext securityContext)
AuthenticationMechanism
The individual mechanisms should update the response headers and body of the message as appropriate however they should
not set the response code, instead that should be indicated in the AuthenticationMechanism.ChallengeResult and the most appropriate
overall response code will be selected.
This method should not return null.
sendChallenge in interface AuthenticationMechanismexchange - The exchangesecurityContext - The security contextAuthenticationMechanism.ChallengeResult indicating if a challenge was sent and the desired response code.Copyright © 2018. All rights reserved.