Class StoredCredential
- java.lang.Object
-
- com.microsoft.credentialstorage.model.StoredCredential
-
- All Implemented Interfaces:
StoredSecret
public final class StoredCredential extends Object implements StoredSecret
Credential for user authentication.
-
-
Constructor Summary
Constructors Constructor Description StoredCredential(String username, char[] password)Creates a credential object with a username and password pair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear the secret value.booleanequals(Object o)Compares an object to thisStoredCredentialfor equality.char[]getPassword()Secret related to the username.StringgetUsername()Unique identifier of the user.inthashCode()Gets a hash code based on the contents of theStoredCredential.
-
-
-
Constructor Detail
-
StoredCredential
public StoredCredential(String username, char[] password)
Creates a credential object with a username and password pair.- Parameters:
username- The username value of theStoredCredential.password- The password value of theStoredCredential.
-
-
Method Detail
-
getUsername
public String getUsername()
Unique identifier of the user.- Returns:
- username
-
getPassword
public char[] getPassword()
Secret related to the username.- Returns:
- secret
-
clear
public void clear()
Clear the secret value.- Specified by:
clearin interfaceStoredSecret
-
equals
public boolean equals(Object o)
Compares an object to thisStoredCredentialfor equality.
-
hashCode
public int hashCode()
Gets a hash code based on the contents of theStoredCredential.
-
-