JBoss Java Authentication SPI for Containers 1.0 API 1.0.0.Final

javax.security.auth.message.callback
Class PasswordValidationCallback

java.lang.Object
  extended by javax.security.auth.message.callback.PasswordValidationCallback
All Implemented Interfaces:
Callback

public class PasswordValidationCallback
extends Object
implements Callback

Callback for PasswordValidation.

Since:
May 11, 2006
Version:
$Revision: 64016 $
Author:
Anil Saldhana, Charlie Lai, Ron Monzillo (Javadoc for JSR-196)

Constructor Summary
PasswordValidationCallback(Subject subject, String username, char[] password)
          Create a new PasswordValidationCallback.
 
Method Summary
 void clearPassword()
          Clear the password.
 char[] getPassword()
          Get the password.
 boolean getResult()
          Get the authentication result.
 Subject getSubject()
           
 String getUsername()
          Get the username.
 void setResult(boolean result)
          Set the authentication result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordValidationCallback

public PasswordValidationCallback(Subject subject,
                                  String username,
                                  char[] password)
Create a new PasswordValidationCallback.

Parameters:
username - the username to authenticate
password - the user�s password, which may be null.
Method Detail

clearPassword

public void clearPassword()
Clear the password.


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.

getSubject

public Subject getSubject()

getResult

public boolean getResult()
Get the authentication result.

Returns:
true if authentication succeeded, false otherwise

getUsername

public String getUsername()
Get the username.

Returns:
the username.

setResult

public void setResult(boolean result)
Set the authentication result.

Parameters:
result - true if authentication succeeded, false otherwise

JBoss Java Authentication SPI for Containers 1.0 API 1.0.0.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.