public class UsernamePasswordCredential extends AbstractClearableCredential
Constructor and Description |
---|
UsernamePasswordCredential(String callerName,
Password password)
Constructor.
|
UsernamePasswordCredential(String callerName,
String password)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCredential()
Invokes the specific subclass to securely clear the credential value.
|
boolean |
compareTo(String callerName,
String password) |
String |
getCaller() |
Password |
getPassword()
Determines the password.
|
String |
getPasswordAsString()
Determines the password.
|
clear, isCleared, setCleared
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid
public UsernamePasswordCredential(String callerName, String password)
callerName
- The caller namepassword
- The password, as a Stringpublic Password getPassword()
public 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 String getCaller()
Copyright © 1996-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.