AuthenticationMechanism
public class ExternalAuthenticationMechanism extends java.lang.Object implements AuthenticationMechanism
Modifier and Type | Class | Description |
---|---|---|
static class |
ExternalAuthenticationMechanism.Factory |
AuthenticationMechanism.AuthenticationMechanismOutcome, AuthenticationMechanism.ChallengeResult
Modifier and Type | Field | Description |
---|---|---|
static AttachmentKey<java.lang.String> |
EXTERNAL_AUTHENTICATION_TYPE |
|
static AttachmentKey<java.lang.String> |
EXTERNAL_PRINCIPAL |
|
static java.lang.String |
NAME |
Constructor | Description |
---|---|
ExternalAuthenticationMechanism() |
|
ExternalAuthenticationMechanism(java.lang.String name) |
|
ExternalAuthenticationMechanism(java.lang.String name,
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 AttachmentKey<java.lang.String> EXTERNAL_PRINCIPAL
public static final AttachmentKey<java.lang.String> EXTERNAL_AUTHENTICATION_TYPE
public ExternalAuthenticationMechanism(java.lang.String name, IdentityManager identityManager)
public ExternalAuthenticationMechanism(java.lang.String name)
public ExternalAuthenticationMechanism()
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.
This method should not return null
.
sendChallenge
in interface AuthenticationMechanism
exchange
- The exchangesecurityContext
- The security contextAuthenticationMechanism.ChallengeResult
indicating if a challenge was sent and the desired response code.Copyright © 2018. All rights reserved.