Class PasswordStrengthValidator
java.lang.Object
ch.tocco.nice2.web.core.impl.auth.password.PasswordStrengthValidator
- All Implemented Interfaces:
PasswordValidator
Checks the password policy
- Length at least 8
- At least one lower case character
- At least one upper case character
- At least one digit
- May not contain words
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected static class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPasswordStrengthValidator
(DictionaryService dictionaryService, TextResources textResources) -
Method Summary
Modifier and TypeMethodDescriptionprotected PasswordRule
createPasswordRule
(org.passay.Rule rule) protected List
<org.passay.Rule> createPasswordValidatorRules
(org.passay.dictionary.Dictionary dictionary) getRules()
validatePassword
(String username, String newPassword) Validates a new password
-
Field Details
-
PASSWORD_RULE_LENGTH
- See Also:
-
PASSWORD_RULE_CHARACTER_BASE
- See Also:
-
PASSWORD_RULE_DICTIONARY
- See Also:
-
-
Constructor Details
-
PasswordStrengthValidator
-
-
Method Details
-
validatePassword
Description copied from interface:PasswordValidator
Validates a new password- Specified by:
validatePassword
in interfacePasswordValidator
- Parameters:
username
- the name of the user to validate the password fornewPassword
- the new password
-
getRules
- Specified by:
getRules
in interfacePasswordValidator
-
createPasswordRule
-
createPasswordValidatorRules
protected List<org.passay.Rule> createPasswordValidatorRules(org.passay.dictionary.Dictionary dictionary)
-