|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.integration.authentication.PasswordHelper
public class PasswordHelper
Various password helper methods.
| Field Summary | |
|---|---|
protected static String |
ERROR_PASSWORD_ALREADY_USED
Exception message when a password has already been used. |
static String |
PASSWORD_ENCRYPTION_ALGORITHM
The password encryption algorithm. |
| Constructor Summary | |
|---|---|
PasswordHelper()
|
|
| Method Summary | |
|---|---|
void |
authenticate(PasswordCredential[] providedCredentials,
List storedCredentials)
Checks if the supplied credentials match the stored credentials. |
void |
encrypt(List credentials)
Encrypts the list of passwords. |
String |
encrypt(String password)
Encrypts the password. |
void |
isUniquePasssword(PasswordCredential newCredential,
RemotePrincipal principal)
Checks if the new credential has already been used by the the principal. |
void |
setPropertyManager(PropertyManager propertyManager)
|
void |
validateRegex(String regex,
PasswordCredential credential)
Validates the password meets the expected regex restriction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String ERROR_PASSWORD_ALREADY_USED
public static final String PASSWORD_ENCRYPTION_ALGORITHM
| Constructor Detail |
|---|
public PasswordHelper()
| Method Detail |
|---|
public void validateRegex(String regex,
PasswordCredential credential)
throws InvalidCredentialException
regex - The regex pattern.credential - The password to check.
InvalidCredentialException - The password failed the regex check.
public void isUniquePasssword(PasswordCredential newCredential,
RemotePrincipal principal)
throws InvalidCredentialException
newCredential - The new credential.principal - The principal.
InvalidCredentialException - The password has already been used.
public String encrypt(String password)
throws InvalidCredentialException
password - The password.
InvalidCredentialException - The password could not be encrypted.
public void encrypt(List credentials)
throws InvalidCredentialException
credentials - The passwords.
InvalidCredentialException - The passwords could not be encrypted.
public void authenticate(PasswordCredential[] providedCredentials,
List storedCredentials)
throws InvalidAuthenticationException
providedCredentials - The supplied credentials.storedCredentials - The valid credentials.
InvalidAuthenticationException - Invalid authentication.public void setPropertyManager(PropertyManager propertyManager)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||