com.atlassian.crowd.integration.authentication
Class PasswordHelper
java.lang.Object
com.atlassian.crowd.integration.authentication.PasswordHelper
public class PasswordHelper
- extends java.lang.Object
Various password helper methods.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PasswordHelper
public PasswordHelper()
validateRegex
public boolean validateRegex(java.lang.String regex,
PasswordCredential credential)
- Validates the password meets the expected regex restriction.
- Parameters:
regex - The regex pattern.credential - The password to check.
- Returns:
- true if the password is not blank/null and matches the given regex
isUniquePassword
public boolean isUniquePassword(PasswordCredential newCredential,
InternalUser user,
int lastPasswordsToCheck)
- Checks if the new encrypted credential has already been used by the the user
in their credential history.
- Parameters:
newCredential - The new encrypted credential.user - The user.
- Returns:
- boolean
true if the password does not match the existing password or any from the user's credential history.
generateRandomPassword
public java.lang.String generateRandomPassword()
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.