public class GenericHeaderAuthenticationMechanism extends Object implements AuthenticationMechanism
Modifier and Type | Class and Description |
---|---|
static class |
GenericHeaderAuthenticationMechanism.Factory |
AuthenticationMechanism.AuthenticationMechanismOutcome, AuthenticationMechanism.ChallengeResult
Modifier and Type | Field and Description |
---|---|
static String |
IDENTITY_HEADER |
static String |
NAME |
static String |
SESSION_HEADER |
Constructor and Description |
---|
GenericHeaderAuthenticationMechanism(String mechanismName,
List<HttpString> identityHeaders,
List<String> sessionCookieNames,
IdentityManager identityManager) |
Modifier and Type | Method and 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 String NAME
public static final String IDENTITY_HEADER
public static final String SESSION_HEADER
public GenericHeaderAuthenticationMechanism(String mechanismName, List<HttpString> identityHeaders, List<String> sessionCookieNames, IdentityManager identityManager)
public AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext)
AuthenticationMechanism
authenticate
in interface AuthenticationMechanism
exchange
- 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.
sendChallenge
in interface AuthenticationMechanism
exchange
- The exchangesecurityContext
- The security contextAuthenticationMechanism.ChallengeResult
indicating if a challenge was sent and the desired response code.Copyright © 2016 JBoss by Red Hat. All rights reserved.