public final class PasswordRuleTester
extends java.lang.Object
Users create or recover their credentials and when
they change passwords.| Modifier and Type | Method and Description |
|---|---|
void |
assertNotExpired(int currentPasswordTimestamp)
Checks if the password has expired according to the password rules, throwing
an exception if it has expired.
|
boolean |
checkExpiry(int currentPasswordTimestamp)
Checks if the password has expired according to the password rules.
|
void |
checkHistory(SecureStringBuffer password,
byte[][] passwordHistoryDigests) |
boolean |
getCaseIgnore()
Returns true if the password is not treated as case-sensitive.
|
boolean |
getDigit()
Returns true if the password must contain a number.
|
boolean |
getDisableSLO()
getDisableSLO
|
java.util.Date |
getExpirationDate(int currentPasswordTimestamp)
Returns the date/time at which the password expires.
|
int |
getExpirationTimeInWeeks()
Returns the number weeks the password can be used before it will expire.
|
int |
getLoginTimeoutInMinutes()
Returns the time interval after which the Entrust login interface will require the
user to re-enter his password, if there has been no keyboard or mouse activity.
|
boolean |
getLower()
Returns true if the password must contain a lower case character.
|
int |
getMinimumPasswordLength()
Returns the minimum number of characters permitted in the user's password.
|
boolean |
getNonAlpha()
Returns true if the password must contain a non-alphanumeric character.
|
int |
getNotReuseLastPasswords()
Returns the number of password changes that must take place before the user
is permitted to change password to a previous one.
|
boolean |
getOk2repeat()
Returns false if the password must not repeat characters.
|
boolean |
getOkBlanks()
Returns false if the password is not allowed to contain whitespace.
|
boolean |
getUpper()
Returns true if the password must contain an upper case character.
|
java.lang.String |
toString()
Shows the password rules as a String
|
void |
validatePassword(SecureStringBuffer password)
Validates a given password according to the rules set on the PKI.
|
void |
validatePassword(SecureStringBuffer password,
ByteArray[] history)
Validates a given password according to the rules set on the PKI,
checking the length, character content, and password history.
|
public int getExpirationTimeInWeeks()
public int getNotReuseLastPasswords()
public int getMinimumPasswordLength()
public int getLoginTimeoutInMinutes()
public boolean getDisableSLO()
public boolean getOk2repeat()
public boolean getOkBlanks()
public boolean getDigit()
public boolean getLower()
public boolean getUpper()
public boolean getNonAlpha()
public boolean getCaseIgnore()
public void validatePassword(SecureStringBuffer password) throws UserBadPasswordException
password - The password to be used.UserBadPasswordException - if the password violates the password rules.public void validatePassword(SecureStringBuffer password, ByteArray[] history) throws UserBadPasswordException
password - The password to be used.history - The password historyUserBadPasswordException - if the password violates the password rules.User.changePassword(SecureStringBuffer oldPassword, SecureStringBuffer newPassword)public void checkHistory(SecureStringBuffer password, byte[][] passwordHistoryDigests) throws UserBadPasswordException
UserBadPasswordExceptionpublic boolean checkExpiry(int currentPasswordTimestamp)
The password rules contain a value called 'password expiry in weeks'. This value indicates how long a password can be used for (in weeks) before it must be changed. Using this value and the timestamp of when the password was last changed, it can be determined if the password is expired at the present date/time. If the password rules contain a value of zero for 'password expiry in weeks' then the password never expires.
The current password timestamp represents the date/time the current password was set; this value exists in certain Digital Identity stores. Its date/time format is an integer containing the number seconds since January 1, 1970, 00:00:00 GMT.
currentPasswordTimestamp - the timestamp when the user's current password was settrue if the password is expired; false
otherwisepublic void assertNotExpired(int currentPasswordTimestamp)
throws UserBadPasswordException
The password rules contain a value called 'password expiry in weeks'. This value indicates how long a password can be used for (in weeks) before it must be changed. Using this value and the timestamp of when the password was last changed, it can be determined if the password is expired at the present date/time. If the password rules contain a value of zero for 'password expiry in weeks' then the password never expires.
The current password timestamp represents the date/time the current password was set; this value exists in certain Digital Identity stores. Its date/time format is an integer containing the number seconds since January 1, 1970, 00:00:00 GMT.
currentPasswordTimestamp - the timestamp when the user's current password was setUserBadPasswordException - thrown if the password is expiredpublic java.util.Date getExpirationDate(int currentPasswordTimestamp)
The password rules contain a value called 'password expiry in weeks'. This
value indicates how long a password can be used for (in weeks) before it must
be changed. Using this value and a timestamp of when the password was last
changed, it can be determined if the password is expired at the present
date/time. If the password rules contain a value of zero for 'password
expiry in weeks' then the password never expires and null is
returned.
The current password timestamp represents the date/time the current password was set; this value exists in certain Digital Identity stores. Its date/time format is an integer containing the number seconds since January 1, 1970, 00:00:00 GMT.
currentPasswordTimestamp - the timestamp when the user's current password was setnull if the
password never expirespublic java.lang.String toString()
toString in class java.lang.Object