public class PasswordCredential
extends java.lang.Object
implements jespa.security.Credential
Modifier and Type | Field and Description |
---|---|
protected char[] |
password |
protected SecurityPrincipal |
principal |
Constructor and Description |
---|
PasswordCredential(java.lang.String acctname,
char[] password)
Construct a new plaintext password credential.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Scrub the plaintext password characters.
|
char[] |
getPassword()
Return the plaintext password.
|
SecurityPrincipal |
getSecurityPrincipal()
Return the security principal for this credential.
|
java.lang.String |
toString()
Return the value of principal.getName().
|
protected char[] password
protected SecurityPrincipal principal
public PasswordCredential(java.lang.String acctname, char[] password) throws SecurityProviderException
SecurityPrincipal.SecurityPrincipal(java.lang.String, java.lang.String)
constructor for possible account name forms.acctname
- the account name like alice@example.com
password
- the plaintext passwordSecurityProviderException
public SecurityPrincipal getSecurityPrincipal()
getSecurityPrincipal
in interface jespa.security.Credential
public char[] getPassword()
public void destroy()
destroy
in interface jespa.security.Credential
public java.lang.String toString()
toString
in class java.lang.Object