org.apache.jetspeed.security.spi.impl
Class DefaultPasswordCredentialImpl

java.lang.Object
  extended by org.apache.jetspeed.security.spi.impl.DefaultPasswordCredentialImpl
All Implemented Interfaces:
Serializable, org.apache.jetspeed.security.PasswordCredential

public class DefaultPasswordCredentialImpl
extends Object
implements org.apache.jetspeed.security.PasswordCredential, Serializable

Default Password credential implementation. Provides the same mechanism as J2EE javax.resource.spi.security.PasswordCredential.

Code borrowed from the Geronimo project.

Author:
David Le Strat
See Also:
Serialized Form

Field Summary
private  int authenticationFailures
          The number of authentication failures
private  boolean enabled
          The enabled state.
private  Date expirationDate
          The expiration date.
private  boolean expired
          The expired state.
private  Timestamp lastAuthenticationDate
          The last authentication in date
private  char[] password
          The password.
private  Timestamp previousAuthenticationDate
          The previous authentication in date
private static long serialVersionUID
          The default uid.
private  boolean updateRequired
          The update required state
private  String userName
          The user name.
 
Fields inherited from interface org.apache.jetspeed.security.PasswordCredential
PASSWORD_CREDENTIAL_DAYS_VALID_REQUEST_ATTR_KEY
 
Constructor Summary
DefaultPasswordCredentialImpl(String userName, char[] password)
           
DefaultPasswordCredentialImpl(String userName, org.apache.jetspeed.security.om.InternalCredential credential)
           
 
Method Summary
 boolean equals(Object o)
           
 int getAuthenticationFailures()
           
 Date getExpirationDate()
           
 Timestamp getLastAuthenticationDate()
           
 char[] getPassword()
           
 Timestamp getPreviousAuthenticationDate()
           
 String getUserName()
           
 int hashCode()
           
 boolean isEnabled()
           
 boolean isExpired()
           
 boolean isUpdateRequired()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
The default uid.

See Also:
Constant Field Values

userName

private String userName
The user name.


password

private char[] password
The password.


updateRequired

private boolean updateRequired
The update required state


enabled

private boolean enabled
The enabled state.


expired

private boolean expired
The expired state.


expirationDate

private Date expirationDate
The expiration date.


previousAuthenticationDate

private Timestamp previousAuthenticationDate
The previous authentication in date


lastAuthenticationDate

private Timestamp lastAuthenticationDate
The last authentication in date


authenticationFailures

private int authenticationFailures
The number of authentication failures

Constructor Detail

DefaultPasswordCredentialImpl

public DefaultPasswordCredentialImpl(String userName,
                                     char[] password)
Parameters:
userName -
password -

DefaultPasswordCredentialImpl

public DefaultPasswordCredentialImpl(String userName,
                                     org.apache.jetspeed.security.om.InternalCredential credential)
Method Detail

getUserName

public String getUserName()
Specified by:
getUserName in interface org.apache.jetspeed.security.PasswordCredential
Returns:
The username.

getPassword

public char[] getPassword()
Specified by:
getPassword in interface org.apache.jetspeed.security.PasswordCredential
Returns:
The password.

isUpdateRequired

public boolean isUpdateRequired()
Specified by:
isUpdateRequired in interface org.apache.jetspeed.security.PasswordCredential
See Also:
PasswordCredential.isUpdateRequired()

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface org.apache.jetspeed.security.PasswordCredential
See Also:
PasswordCredential.isEnabled()

isExpired

public boolean isExpired()
Specified by:
isExpired in interface org.apache.jetspeed.security.PasswordCredential
See Also:
PasswordCredential.isExpired()

getExpirationDate

public Date getExpirationDate()
Specified by:
getExpirationDate in interface org.apache.jetspeed.security.PasswordCredential
See Also:
PasswordCredential.getExpirationDate()

getPreviousAuthenticationDate

public Timestamp getPreviousAuthenticationDate()
Specified by:
getPreviousAuthenticationDate in interface org.apache.jetspeed.security.PasswordCredential
See Also:
PasswordCredential.getPreviousAuthenticationDate()

getLastAuthenticationDate

public Timestamp getLastAuthenticationDate()
Specified by:
getLastAuthenticationDate in interface org.apache.jetspeed.security.PasswordCredential
See Also:
PasswordCredential.getLastAuthenticationDate()

getAuthenticationFailures

public int getAuthenticationFailures()
Specified by:
getAuthenticationFailures in interface org.apache.jetspeed.security.PasswordCredential
See Also:
PasswordCredential.getAuthenticationFailures()

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.