Module jakarta.security
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
ConstructorDescriptionUsernamePasswordCredential
(String callerName, Password password) Constructor.UsernamePasswordCredential
(String callerName, String password) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Invokes the specific subclass to securely clear the credential value.boolean
Determines the password.Determines the password.Methods inherited from class jakarta.security.enterprise.credential.AbstractClearableCredential
clear, isCleared, setCleared
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.security.enterprise.credential.Credential
isValid
-
Constructor Details
-
UsernamePasswordCredential
-
UsernamePasswordCredential
-
-
Method Details
-
getPassword
-
getPasswordAsString
-
clearCredential
public void clearCredential()Description copied from class:AbstractClearableCredential
Invokes the specific subclass to securely clear the credential value. Some
subclasses contain credential values which are inherently secure, such as tokens, for which clearing the credential may not be necessary.Credential
For example, if the credential includes a password, this method would overwrite the password value.
- Specified by:
clearCredential
in classAbstractClearableCredential
-
getCaller
-
compareTo
-