Package io.undertow.security.idm
Interface DigestCredential
-
- All Superinterfaces:
Credential
public interface DigestCredential extends Credential
An extension ofCredentialto provide some additional methods needed to enable verification of a request whereDigestAuthenticationMechanismis in use.- Author:
- Darran Lofthouse
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DigestAlgorithmgetAlgorithm()Obtain the selectedDigestAlgorithmfor the request being authenticated.StringgetRealm()Get the realm name the credential is being validated against.byte[]getSessionData()If the algorithm is session based return the session data to be included when generating the ha1.booleanverifyHA1(byte[] ha1)Called by theIdentityManagerimplementation to pass in the hex encoded a1 representation for validation against the current request.
-
-
-
Method Detail
-
getAlgorithm
DigestAlgorithm getAlgorithm()
Obtain the selectedDigestAlgorithmfor the request being authenticated.- Returns:
- The
DigestAlgorithmfor the request being authenticated.
-
verifyHA1
boolean verifyHA1(byte[] ha1)
Called by theIdentityManagerimplementation to pass in the hex encoded a1 representation for validation against the current request. TheCredentialis self validating based on the information passed in here, if verification is successful then theIdentityManagercan return the appropriateAccountrepresentation.- Parameters:
ha1- - The hex encoded a1 value.- Returns:
- true if verification was successful, false otherwise.
-
getRealm
String getRealm()
Get the realm name the credential is being validated against.- Returns:
- The realm name.
-
getSessionData
byte[] getSessionData()
If the algorithm is session based return the session data to be included when generating the ha1.- Returns:
- The session data.
- Throws:
IllegalStateException- where the algorithm is not session based.
-
-