ConfigurablePasswordPolicy instead@Deprecated public class DefaultPasswordPolicy extends Object implements PasswordPolicy
PasswordPolicy requiring 6 to 64 non-whitespace characters for a valid password.PasswordPolicy.ValidationResult| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR_MSSG_KEY
Deprecated.
|
static String |
REGEX
Deprecated.
|
LOWERCASE, NUMBER, PUNCT, UPPERCASE| Constructor and Description |
|---|
DefaultPasswordPolicy()
Deprecated.
|
DefaultPasswordPolicy(String regEx,
String errorMessageKey)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Properties platformConfig)
Deprecated.
Configures the
PasswordPolicy |
String |
generatePassword()
Deprecated.
Generates a new random password that matches the requirements and returns it.
|
String |
getErrorMessageKey()
Deprecated.
Returns the message-key of an errormessage for the case that the password doesn't match the requirements.
|
Pattern |
getPattern()
Deprecated.
|
boolean |
isValidPassword(char[] password)
Deprecated.
Checks whether the given character-sequence is a valid password.
|
PasswordPolicy.ValidationResult |
validatePassword(String username,
char[] currentPassword,
char[] password)
Deprecated.
Validates the password an returns a
PasswordPolicy.ValidationResult |
public static final String REGEX
public static final String ERROR_MSSG_KEY
@Deprecated public DefaultPasswordPolicy()
@Deprecated public DefaultPasswordPolicy(String regEx, String errorMessageKey)
public void configure(Properties platformConfig)
PasswordPolicyPasswordPolicyconfigure in interface PasswordPolicyplatformConfig - the platform's Propertiespublic boolean isValidPassword(char[] password)
PasswordPolicyisValidPassword in interface PasswordPolicypassword - the character-sequence sequence to checktrue if the character-sequence is a valid password, false otherwisepublic PasswordPolicy.ValidationResult validatePassword(String username, char[] currentPassword, char[] password)
PasswordPolicyPasswordPolicy.ValidationResultvalidatePassword in interface PasswordPolicyusername - the username (can be null)currentPassword - the current password (can be null)password - the new password (must not be null)public String getErrorMessageKey()
PasswordPolicygetErrorMessageKey in interface PasswordPolicypublic Pattern getPattern()
public String generatePassword()
PasswordPolicygeneratePassword in interface PasswordPolicyCopyright © 2011–2023 aiticon GmbH. All rights reserved.