public class PasswordValidationCallback
extends java.lang.Object
implements javax.security.auth.callback.Callback
| Modifier and Type | Field and Description |
|---|---|
private char[] |
password |
private boolean |
resultOfAuthentication |
private javax.security.auth.Subject |
subject |
private java.lang.String |
username |
| Constructor and Description |
|---|
PasswordValidationCallback(javax.security.auth.Subject subject,
java.lang.String username,
char[] password)
Create a new PasswordValidationCallback.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearPassword()
Clear the password.
|
char[] |
getPassword()
Get the password.
|
boolean |
getResult()
Get the authentication result.
|
javax.security.auth.Subject |
getSubject() |
java.lang.String |
getUsername()
Get the username.
|
void |
setResult(boolean result)
Set the authentication result.
|
private java.lang.String username
private char[] password
private boolean resultOfAuthentication
private javax.security.auth.Subject subject
public PasswordValidationCallback(javax.security.auth.Subject subject,
java.lang.String username,
char[] password)
username - the username to authenticatepassword - the user's password, which may be null.public void clearPassword()
public char[] getPassword()
public javax.security.auth.Subject getSubject()
public boolean getResult()
public java.lang.String getUsername()
public void setResult(boolean result)
result - true if authentication succeeded, false otherwise