Package io.undertow.security.idm
Interface DigestCredential
-
- All Superinterfaces:
Credential
public interface DigestCredential extends Credential
An extension ofCredential
to provide some additional methods needed to enable verification of a request whereDigestAuthenticationMechanism
is in use.- Author:
- Darran Lofthouse
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DigestAlgorithm
getAlgorithm()
Obtain the selectedDigestAlgorithm
for the request being authenticated.java.lang.String
getRealm()
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.boolean
verifyHA1(byte[] ha1)
Called by theIdentityManager
implementation to pass in the hex encoded a1 representation for validation against the current request.
-
-
-
Method Detail
-
getAlgorithm
DigestAlgorithm getAlgorithm()
Obtain the selectedDigestAlgorithm
for the request being authenticated.- Returns:
- The
DigestAlgorithm
for the request being authenticated.
-
verifyHA1
boolean verifyHA1(byte[] ha1)
Called by theIdentityManager
implementation to pass in the hex encoded a1 representation for validation against the current request. TheCredential
is self validating based on the information passed in here, if verification is successful then theIdentityManager
can return the appropriateAccount
representation.- Parameters:
ha1
- - The hex encoded a1 value.- Returns:
- true if verification was successful, false otherwise.
-
getRealm
java.lang.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:
java.lang.IllegalStateException
- where the algorithm is not session based.
-
-