org.opengts.db
Interface PasswordHandler

All Known Implementing Classes:
GeneralPasswordHandler

public interface PasswordHandler


Method Summary
 boolean checkPassword(java.lang.String enteredPass, java.lang.String tablePass)
          Returns true if the entered password matches the password saved in the table
 java.lang.String decodePassword(java.lang.String tablePass)
          Decode/Decrypt password
 java.lang.String encodePassword(java.lang.String userPass)
          Encode/Encrypt password
 java.lang.String getName()
          Gets the name of this instance
 java.lang.String getPasswordFormatDescription(java.util.Locale locale)
          Gets the short text description of the acceptable password format
 boolean hasPasswordExpired(long lastChangedTime)
          Returns true if the password has expired (time for new password)
 boolean validateNewPassword(java.lang.String newPass)
          Returns true if the new password adheres to the password policy
 

Method Detail

getName

java.lang.String getName()
Gets the name of this instance

Returns:
The name of this instance

encodePassword

java.lang.String encodePassword(java.lang.String userPass)
Encode/Encrypt password

Parameters:
userPass - Password to encode/encrypt
Returns:
The encoded/encrypted password

decodePassword

java.lang.String decodePassword(java.lang.String tablePass)
Decode/Decrypt password

Parameters:
tablePass - Password to decode/decrypt
Returns:
The decoded/decrypted password, or null if the password cannot be decoded/decrypted

checkPassword

boolean checkPassword(java.lang.String enteredPass,
                      java.lang.String tablePass)
Returns true if the entered password matches the password saved in the table

Parameters:
enteredPass - User entered password
tablePass - The password saved in the table (possibly encrypted)
Returns:
True if password match, false otherwise

validateNewPassword

boolean validateNewPassword(java.lang.String newPass)
Returns true if the new password adheres to the password policy

Parameters:
newPass - The new password candidate
Returns:
True if the password adheres to the password policy, false otherwise

getPasswordFormatDescription

java.lang.String getPasswordFormatDescription(java.util.Locale locale)
Gets the short text description of the acceptable password format

Parameters:
locale - The language locale
Returns:
The short text description of the acceptable password format

hasPasswordExpired

boolean hasPasswordExpired(long lastChangedTime)
Returns true if the password has expired (time for new password)

Parameters:
lastChangedTime - Time of last password change
Returns:
True is the password has expired