org.apache.jetspeed.security
Interface PasswordCredential

All Superinterfaces:
Credential, java.io.Serializable, UserCredential

public interface PasswordCredential
extends UserCredential

PasswordCredential

Version:
$Id: PasswordCredential.java 698325 2008-09-23 20:06:06Z ate $
Author:
Ate Douma

Field Summary
static java.lang.String PASSWORD_CREDENTIAL_DAYS_VALID_REQUEST_ATTR_KEY
           
static java.lang.Short TYPE_CURRENT
           
static java.lang.Short TYPE_HISTORICAL
           
 
Method Summary
 void clearNewPasswordSet()
           
 java.lang.String getNewPassword()
           
 java.lang.String getOldPassword()
           
 java.lang.String getPassword()
           
 java.lang.Short getType()
           
 User getUser()
           
 boolean isEncoded()
           
 boolean isNew()
           
 boolean isNewPasswordSet()
           
 boolean isStateReadOnly()
           
 void revertNewPasswordSet()
           
 void setAuthenticationFailures(int authenticationFailures)
           
 void setEnabled(boolean enabled)
           
 void setEncoded(boolean encoded)
           
 void setExpirationDate(java.sql.Date expirationDate)
           
 void setExpired(boolean expired)
           
 void setLastAuthenticationDate(java.sql.Timestamp date)
           
 void setPassword(java.lang.String password, boolean encoded)
          Set a new raw (possibly encoded) password
 void setPassword(java.lang.String oldPassword, java.lang.String newPassword)
          Set a new unencoded password and providing the old (unencoded) password for validation
 void setPreviousAuthenticationDate(java.sql.Timestamp date)
           
 void setUpdateRequired(boolean updateRequired)
           
 
Methods inherited from interface org.apache.jetspeed.security.UserCredential
getAuthenticationFailures, getCreationDate, getExpirationDate, getLastAuthenticationDate, getModifiedDate, getPreviousAuthenticationDate, getUserName, isEnabled, isExpired, isUpdateAllowed, isUpdateRequired, synchronize
 

Field Detail

PASSWORD_CREDENTIAL_DAYS_VALID_REQUEST_ATTR_KEY

static final java.lang.String PASSWORD_CREDENTIAL_DAYS_VALID_REQUEST_ATTR_KEY

TYPE_CURRENT

static final java.lang.Short TYPE_CURRENT

TYPE_HISTORICAL

static final java.lang.Short TYPE_HISTORICAL
Method Detail

isNew

boolean isNew()

getUser

User getUser()
Returns:
The user the PasswordCredential belongs to

getType

java.lang.Short getType()

getPassword

java.lang.String getPassword()
Returns:
raw (possibly encoded) password.

getOldPassword

java.lang.String getOldPassword()
Returns:
the temporary old (plain text) password provided when a new password is set

getNewPassword

java.lang.String getNewPassword()
Returns:
the temporary new (plain text) password provided when a new password is set

setPassword

void setPassword(java.lang.String password,
                 boolean encoded)
Set a new raw (possibly encoded) password

Parameters:
password -
encoded -

setPassword

void setPassword(java.lang.String oldPassword,
                 java.lang.String newPassword)
Set a new unencoded password and providing the old (unencoded) password for validation

Depending on the implementation one or more pluggable validation and processing handlers might be invoked when the PasswordCredential is stored.

A User changing its own password should be required to provide an oldPassword to validate against and might trigger different processing than when a null value is provided for the oldPassword

Parameters:
oldPassword -
newPassword -

isNewPasswordSet

boolean isNewPasswordSet()

clearNewPasswordSet

void clearNewPasswordSet()

revertNewPasswordSet

void revertNewPasswordSet()

isEncoded

boolean isEncoded()

setEncoded

void setEncoded(boolean encoded)

setUpdateRequired

void setUpdateRequired(boolean updateRequired)

isStateReadOnly

boolean isStateReadOnly()

setEnabled

void setEnabled(boolean enabled)

setExpired

void setExpired(boolean expired)

setExpirationDate

void setExpirationDate(java.sql.Date expirationDate)

setPreviousAuthenticationDate

void setPreviousAuthenticationDate(java.sql.Timestamp date)

setLastAuthenticationDate

void setLastAuthenticationDate(java.sql.Timestamp date)

setAuthenticationFailures

void setAuthenticationFailures(int authenticationFailures)


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.