Class UsernamePasswordCredential
java.lang.Object
jakarta.security.enterprise.credential.AbstractClearableCredential
jakarta.security.enterprise.credential.UsernamePasswordCredential
- All Implemented Interfaces:
Credential
- Direct Known Subclasses:
BasicAuthenticationCredential
Represents the credentials typically used by standard caller name/password authentication.
-
Constructor Summary
ConstructorsConstructorDescriptionUsernamePasswordCredential(String callerName, Password password) Constructor.UsernamePasswordCredential(String callerName, String password) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidInvokes the specific subclass to securely clear the credential value.booleanDetermines the password.Determines the password.Methods inherited from class AbstractClearableCredential
clear, isCleared, setClearedModifier and TypeMethodDescriptionfinal voidclear()Clears the credential.final booleanDetermines whether the credential value has been securely cleared.protected final voidSpecifies that the credential value has been securely cleared.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Credential
isValidModifier and TypeMethodDescriptiondefault booleanisValid()Determines whether the credential is valid.
-
Constructor Details
-
UsernamePasswordCredential
-
UsernamePasswordCredential
-
-
Method Details
-
getPassword
-
getPasswordAsString
-
clearCredential
public void clearCredential()Description copied from class:AbstractClearableCredentialInvokes the specific subclass to securely clear the credential value. Somesubclasses contain credential values which are inherently secure, such as tokens, for which clearing the credential may not be necessary.CredentialFor example, if the credential includes a password, this method would overwrite the password value.
- Specified by:
clearCredentialin classAbstractClearableCredential
-
getCaller
-
compareTo
-