Interface DigestCredential

All Superinterfaces:
Credential

public interface DigestCredential extends 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 Type
    Method
    Description
    Obtain the selected DigestAlgorithm for the request being authenticated.
    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 the IdentityManager implementation to pass in the hex encoded a1 representation for validation against the current request.
  • Method Details

    • getAlgorithm

      DigestAlgorithm getAlgorithm()
      Obtain the selected DigestAlgorithm for the request being authenticated.
      Returns:
      The DigestAlgorithm for the request being authenticated.
    • verifyHA1

      boolean verifyHA1(byte[] ha1)
      Called by the IdentityManager implementation to pass in the hex encoded a1 representation for validation against the current request. The Credential is self validating based on the information passed in here, if verification is successful then the IdentityManager can return the appropriate Account 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.