Interface UserPasswordService<P extends PasswordToken,U extends User>
- 
- All Superinterfaces:
- org.springframework.security.core.userdetails.UserDetailsPasswordService
 - All Known Implementing Classes:
- DefaultUserPasswordService
 
 public interface UserPasswordService<P extends PasswordToken,U extends User> extends org.springframework.security.core.userdetails.UserDetailsPasswordService- Author:
- Chad Harchar (charchar)
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanchangePassword(ChangePasswordForm changePasswordForm, org.springframework.validation.BindingResult errors)From the providedChangePasswordForm, attempt to change the user's password.booleancreateResetPasswordToken(String clientId, String username)Creates a reset password token for the specified user, if they exist.booleancreateTokenForUser(String clientId, String username)Deprecated.booleanresetPassword(ResetPasswordForm resetPasswordForm, org.springframework.validation.BindingResult errors)From the providedResetPasswordForm, attempt to reset the user's password.UupdatePasswordForUser(U user, String password, String clientId)Send a password change notification email and update the user's password.
 
- 
- 
- 
Method Detail- 
resetPasswordboolean resetPassword(ResetPasswordForm resetPasswordForm, org.springframework.validation.BindingResult errors) From the providedResetPasswordForm, attempt to reset the user's password. If a failure occurs, errors will be populated onBindingResultand `false` is returned. Otherwise, return `true`.- Parameters:
- resetPasswordForm- The form to use to reset the user's password.
- errors- The object to hold any errors that might occur.
- Returns:
- Whether the provided ResetPasswordFormpassed validation in order for the password to be reset.
 
 - 
changePasswordboolean changePassword(ChangePasswordForm changePasswordForm, org.springframework.validation.BindingResult errors) From the providedChangePasswordForm, attempt to change the user's password. If a failure occurs, errors will be populated onBindingResultand `false` is returned. Otherwise, return `true`.- Parameters:
- changePasswordForm- The form to use to change the user's password.
- errors- The object to hold any errors that might occur.
- Returns:
- Whether the provided ChangePasswordFormpassed validation in order for the password to be changed.
 
 - 
createResetPasswordTokenboolean createResetPasswordToken(String clientId, String username) throws AccountLockedException Creates a reset password token for the specified user, if they exist.- Parameters:
- clientId- The- AuthorizedClient.getId()to verify against
- username- The username of the user for which to validate and create a token.
- Returns:
- true if token successfully created, else false.
- Throws:
- AccountLockedException- if user is locked and unable to reset their password
 
 - 
createTokenForUser@Deprecated boolean createTokenForUser(String clientId, String username) throws AccountLockedException Deprecated.Creates a token for the specified user, if they exist.- Parameters:
- clientId- The- AuthorizedClient.getId()to verify against
- username- The username of the user for which to validate and create a token.
- Returns:
- true if token successfully created, else false.
- Throws:
- AccountLockedException- if user is locked and unable to reset their password
 
 - 
updatePasswordForUserU updatePasswordForUser(U user, String password, String clientId) Send a password change notification email and update the user's password.- Parameters:
- user- The user who's password to update.
- password- The new password for the user.
- clientId- The clientId from the request.
- Returns:
- The updated user.
 
 
- 
 
-