Interface PasswordUpdateService
- All Known Implementing Classes:
PasswordUpdateServiceImpl
public interface PasswordUpdateService
-
Method Summary
Modifier and TypeMethodDescriptionvoid
updatePassword
(String username, @Nullable String oldPassword, String newPassword) Updates and verifies the new password for given credentialsvalidatePassword
(String username, String newPassword) Validate a password against the password policy
-
Method Details
-
updatePassword
void updatePassword(String username, @Nullable @Nullable String oldPassword, String newPassword) throws UpdatePasswordException Updates and verifies the new password for given credentials- Parameters:
username
- user for which the new password should be setoldPassword
- the current password (user input) - may be null for usermanagersnewPassword
- new password (user input)- Throws:
UpdatePasswordException
- when the supplied password(s) are not valid
-
validatePassword
Validate a password against the password policy- Parameters:
username
- the name of the usernewPassword
- the new password- Returns:
- the validation result
-
getPasswordRules
List<PasswordRule> getPasswordRules()- Returns:
- the current password policy
-