- java.lang.Object
-
- javax.security.auth.message.callback.PasswordValidationCallback
-
- All Implemented Interfaces:
- Callback
public class PasswordValidationCallback extends Object implements Callback
Callback for PasswordValidation. This callback may be used by an authentication module to employ the password validation facilities of its containing runtime. This Callback would typically be called by aServerAuthModule
duringvalidateRequest
processing.
-
-
Constructor Summary
Constructors Constructor and Description PasswordValidationCallback(Subject subject, String username, char[] password)
Create a PasswordValidationCallback.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
clearPassword()
Clear the password.char[]
getPassword()
Get the password.boolean
getResult()
Get the authentication result.Subject
getSubject()
Get the subject.String
getUsername()
Get the username.void
setResult(boolean result)
Set the authentication result.
-
-
-
Method Detail
-
getSubject
public Subject getSubject()
Get the subject.- Returns:
- The subject.
-
getUsername
public String getUsername()
Get the username.- Returns:
- The username.
-
getPassword
public char[] getPassword()
Get the password.Note that this method returns a reference to the password. If a clone of the array is created it is the caller's responsibility to zero out the password information after it is no longer needed.
- Returns:
- The password, which may be null.
-
clearPassword
public void clearPassword()
Clear the password.
-
setResult
public void setResult(boolean result)
Set the authentication result.- Parameters:
result
- True if authentication succeeded, false otherwise
-
getResult
public boolean getResult()
Get the authentication result.- Returns:
- True if authentication succeeded, false otherwise
-
-
Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/security/auth/message/callback/passwordvalidationcallback.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.