Class DifferentFromOldPasswordValidator
java.lang.Object
ch.tocco.nice2.web.core.impl.auth.password.DifferentFromOldPasswordValidator
- All Implemented Interfaces:
PasswordValidator
@Component
public class DifferentFromOldPasswordValidator
extends Object
implements PasswordValidator
Checks if the new password is different from the old one.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDifferentFromOldPasswordValidator
(PrincipalDetailService principalDetailService, PasswordEncoder passwordEncoder, TextResources textResources) -
Method Summary
Modifier and TypeMethodDescriptiongetRules()
validatePassword
(String username, String newPassword) Validates a new password
-
Field Details
-
PASSWORD_RULE_NOT_CHANGED
- See Also:
-
-
Constructor Details
-
DifferentFromOldPasswordValidator
public DifferentFromOldPasswordValidator(PrincipalDetailService principalDetailService, PasswordEncoder passwordEncoder, TextResources textResources)
-
-
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
-