Class UsernamePasswordCredential
- java.lang.Object
- 
- jakarta.security.enterprise.credential.AbstractClearableCredential
- 
- jakarta.security.enterprise.credential.UsernamePasswordCredential
 
 
- 
- All Implemented Interfaces:
- Credential
 - Direct Known Subclasses:
- BasicAuthenticationCredential
 
 public class UsernamePasswordCredential extends AbstractClearableCredential Represents the credentials typically used by standard caller name/password authentication.
- 
- 
Constructor SummaryConstructors Constructor Description UsernamePasswordCredential(String callerName, Password password)Constructor.UsernamePasswordCredential(String callerName, String password)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCredential()Invokes the specific subclass to securely clear the credential value.booleancompareTo(String callerName, String password)StringgetCaller()PasswordgetPassword()Determines the password.StringgetPasswordAsString()Determines the password.- 
Methods inherited from class jakarta.security.enterprise.credential.AbstractClearableCredentialclear, isCleared, setCleared
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface jakarta.security.enterprise.credential.CredentialisValid
 
- 
 
- 
- 
- 
Method Detail- 
getPasswordpublic Password getPassword() Determines the password.- Returns:
- The password.
 
 - 
getPasswordAsStringpublic String getPasswordAsString() Determines the password.- Returns:
- The password, as a String.
 
 - 
clearCredentialpublic void clearCredential() Description copied from class:AbstractClearableCredentialInvokes the specific subclass to securely clear the credential value. SomeCredentialFor example, if the credential includes a password, this method would overwrite the password value. - Specified by:
- clearCredentialin class- AbstractClearableCredential
 
 - 
getCallerpublic String getCaller() 
 
- 
 
-