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)
PasswordPolicy
PasswordPolicy
configure
in interface PasswordPolicy
platformConfig
- the platform's Properties
public boolean isValidPassword(char[] password)
PasswordPolicy
isValidPassword
in interface PasswordPolicy
password
- 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)
PasswordPolicy
PasswordPolicy.ValidationResult
validatePassword
in interface PasswordPolicy
username
- the username (can be null
)currentPassword
- the current password (can be null
)password
- the new password (must not be null
)public String getErrorMessageKey()
PasswordPolicy
getErrorMessageKey
in interface PasswordPolicy
public Pattern getPattern()
public String generatePassword()
PasswordPolicy
generatePassword
in interface PasswordPolicy
Copyright © 2011–2020 aiticon GmbH. All rights reserved.