org.apache.jetspeed.security.spi.impl
Class DefaultPasswordCredentialImpl
java.lang.Object
org.apache.jetspeed.security.spi.impl.DefaultPasswordCredentialImpl
- All Implemented Interfaces:
- java.io.Serializable, PasswordCredential
public class DefaultPasswordCredentialImpl
- extends java.lang.Object
- implements PasswordCredential, java.io.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
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
DefaultPasswordCredentialImpl
public DefaultPasswordCredentialImpl(java.lang.String userName,
char[] password)
- Parameters:
userName
- password
-
DefaultPasswordCredentialImpl
public DefaultPasswordCredentialImpl(java.lang.String userName,
InternalCredential credential)
getUserName
public java.lang.String getUserName()
- Specified by:
getUserName
in interface PasswordCredential
- Returns:
- The username.
getPassword
public char[] getPassword()
- Specified by:
getPassword
in interface PasswordCredential
- Returns:
- The password.
isUpdateRequired
public boolean isUpdateRequired()
- Specified by:
isUpdateRequired
in interface PasswordCredential
- Returns:
- true if update required.
- See Also:
PasswordCredential.isUpdateRequired()
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interface PasswordCredential
- Returns:
- true if enabled.
- See Also:
PasswordCredential.isEnabled()
isExpired
public boolean isExpired()
- Specified by:
isExpired
in interface PasswordCredential
- Returns:
- true if expired.
- See Also:
PasswordCredential.isExpired()
getExpirationDate
public java.sql.Date getExpirationDate()
- Specified by:
getExpirationDate
in interface PasswordCredential
- Returns:
- when the password is (going to be) expired.
- See Also:
PasswordCredential.getExpirationDate()
getPreviousAuthenticationDate
public java.sql.Timestamp getPreviousAuthenticationDate()
- Specified by:
getPreviousAuthenticationDate
in interface PasswordCredential
- Returns:
- the previous time the user logged in
- See Also:
PasswordCredential.getPreviousAuthenticationDate()
getLastAuthenticationDate
public java.sql.Timestamp getLastAuthenticationDate()
- Specified by:
getLastAuthenticationDate
in interface PasswordCredential
- Returns:
- the last time the user logged in
- See Also:
PasswordCredential.getLastAuthenticationDate()
getAuthenticationFailures
public int getAuthenticationFailures()
- Description copied from interface:
PasswordCredential
Getter for the current number of authentication failures in a row.
- -1: never tried yet
- 0: none, or last attempt was successful
- >0: number of failures
- Specified by:
getAuthenticationFailures
in interface PasswordCredential
- Returns:
- The number of authentication failures
- See Also:
PasswordCredential.getAuthenticationFailures()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
- See Also:
Object.equals(java.lang.Object)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
- See Also:
Object.hashCode()
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.