public class UsernamePasswordCredential extends AbstractClearableCredential
Constructor and Description |
---|
UsernamePasswordCredential(java.lang.String callerName,
Password password)
Constructor.
|
UsernamePasswordCredential(java.lang.String callerName,
java.lang.String password)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCredential()
Invokes the specific subclass to securely clear the credential value.
|
boolean |
compareTo(java.lang.String callerName,
java.lang.String password) |
java.lang.String |
getCaller() |
Password |
getPassword()
Determines the password.
|
java.lang.String |
getPasswordAsString()
Determines the password.
|
clear, isCleared, setCleared
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid
public UsernamePasswordCredential(java.lang.String callerName, java.lang.String password)
callerName
- The caller namepassword
- The password, as a Stringpublic UsernamePasswordCredential(java.lang.String callerName, Password password)
callerName
- The caller namepassword
- The passwordpublic Password getPassword()
public java.lang.String getPasswordAsString()
public void clearCredential()
AbstractClearableCredential
Credential
subclasses contain credential values
which are inherently secure, such as tokens, for which clearing the
credential may not be necessary.
For example, if the credential includes a password, this method would overwrite the password value.
clearCredential
in class AbstractClearableCredential
public java.lang.String getCaller()
public boolean compareTo(java.lang.String callerName, java.lang.String password)