public class DigestAuthenticationMechanism extends Object implements AuthenticationMechanism
HttpHandler
to handle HTTP Digest authentication, both according to RFC-2617 and draft update to allow additional
algorithms to be used.Modifier and Type | Class and Description |
---|---|
static class |
DigestAuthenticationMechanism.Factory |
AuthenticationMechanism.AuthenticationMechanismOutcome, AuthenticationMechanism.ChallengeResult
Modifier and Type | Field and Description |
---|---|
static AuthenticationMechanismFactory |
FACTORY |
Constructor and Description |
---|
DigestAuthenticationMechanism(List<DigestAlgorithm> supportedAlgorithms,
List<DigestQop> supportedQops,
String realmName,
String domain,
NonceManager nonceManager) |
DigestAuthenticationMechanism(List<DigestAlgorithm> supportedAlgorithms,
List<DigestQop> supportedQops,
String realmName,
String domain,
NonceManager nonceManager,
String mechanismName) |
DigestAuthenticationMechanism(List<DigestAlgorithm> supportedAlgorithms,
List<DigestQop> supportedQops,
String realmName,
String domain,
NonceManager nonceManager,
String mechanismName,
IdentityManager identityManager) |
DigestAuthenticationMechanism(String realmName,
String domain,
String mechanismName) |
DigestAuthenticationMechanism(String realmName,
String domain,
String mechanismName,
IdentityManager identityManager) |
Modifier and Type | Method and Description |
---|---|
AuthenticationMechanism.AuthenticationMechanismOutcome |
authenticate(HttpServerExchange exchange,
SecurityContext securityContext)
Perform authentication of the request.
|
void |
sendAuthenticationInfoHeader(HttpServerExchange exchange) |
AuthenticationMechanism.ChallengeResult |
sendChallenge(HttpServerExchange exchange,
SecurityContext securityContext)
Send an authentication challenge to the remote client.
|
public static final AuthenticationMechanismFactory FACTORY
public DigestAuthenticationMechanism(List<DigestAlgorithm> supportedAlgorithms, List<DigestQop> supportedQops, String realmName, String domain, NonceManager nonceManager)
public DigestAuthenticationMechanism(List<DigestAlgorithm> supportedAlgorithms, List<DigestQop> supportedQops, String realmName, String domain, NonceManager nonceManager, String mechanismName)
public DigestAuthenticationMechanism(List<DigestAlgorithm> supportedAlgorithms, List<DigestQop> supportedQops, String realmName, String domain, NonceManager nonceManager, String mechanismName, IdentityManager identityManager)
public DigestAuthenticationMechanism(String realmName, String domain, String mechanismName)
public DigestAuthenticationMechanism(String realmName, String domain, String mechanismName, 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.
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.public void sendAuthenticationInfoHeader(HttpServerExchange exchange)
Copyright © 2019 JBoss by Red Hat. All rights reserved.