Package io.undertow.security.idm
Interface DigestCredential
- All Superinterfaces:
Credential
An extension of
Credential
to provide some additional methods needed to enable verification of a request where
DigestAuthenticationMechanism
is in use.- Author:
- Darran Lofthouse
-
Method Summary
Modifier and TypeMethodDescriptionObtain the selectedDigestAlgorithm
for the request being authenticated.getRealm()
Get the realm name the credential is being validated against.byte[]
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 Details
-
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
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.
-