Class UserCredential

java.lang.Object
org.springframework.credhub.support.user.UserCredential

public class UserCredential extends Object
A user credential consists of an optional username and a password. When retrieved, a user credential will contain a hash of the password.
Author:
Scott Frederick
  • Constructor Details

    • UserCredential

      public UserCredential(String username, String password)
      Create a UserCredential with the specified values.
      Parameters:
      username - the name of the user; must not be null
      password - the password of the user; must not be null
    • UserCredential

      public UserCredential(String password)
      Create a UserCredential with the specified password value.
      Parameters:
      password - the password of the user; must not be null
  • Method Details

    • getUsername

      public String getUsername()
      Get the user name.
      Returns:
      the user name
    • getPassword

      public String getPassword()
      Get the user password.
      Returns:
      the user password
    • getPasswordHash

      public String getPasswordHash()
      Get the SHA-512 hash of the user password.
      Returns:
      the hash of the user password