Class PasswordEntry

java.lang.Object
net.officefloor.web.security.store.PasswordEntry
All Implemented Interfaces:
CredentialEntry

public class PasswordEntry extends Object implements CredentialEntry
Author:
Daniel Sagenschneider
  • Constructor Details

    • PasswordEntry

      public PasswordEntry(String userId, byte[] credentials, Set<String> roles)
      Initiate.
      Parameters:
      userId - User Id.
      credentials - Credentials.
      roles - Roles.
  • Method Details

    • getUserId

      public String getUserId()
      Obtains the User Id.
      Returns:
      User Id.
    • retrieveCredentials

      public byte[] retrieveCredentials()
      Description copied from interface: CredentialEntry

      Retrieves the credentials.

      The actual credentials are particular to the authentication scheme:

      1. Basic: clear text password (Charset being US_ASCII)
      2. Digest: encrypted "username:realm:password" as per the algorithm. For example, if the algorithm were MD5 then the following command would produce the appropriate value (Charset being US_ASCII): echo -n "username:realm:password" | md5sum
      3. Negotiate: as necessary for authentication
      Specified by:
      retrieveCredentials in interface CredentialEntry
      Returns:
      Value as per above description.
    • retrieveRoles

      public Set<String> retrieveRoles()
      Description copied from interface: CredentialEntry
      Retrieves the roles.
      Specified by:
      retrieveRoles in interface CredentialEntry
      Returns:
      Set of roles.