Package org.springframework.security.core.userdetails

# Interface UserDetailsPasswordService

All Known Implementing Classes:
  `InMemoryUserDetailsManager`

public interface UserDetailsPasswordService
An API for changing a `UserDetails` password.

Since:
  5.1

## Method Summary

Modifier and Type
Method
Description
`UserDetails`
`updatePassword(UserDetails user, String newPassword)`
Modify the specified user's password.

## Method Details

### updatePassword

UserDetails updatePassword(UserDetails user, String newPassword)
Modify the specified user's password. This should change the user's password in the persistent user repository (database, LDAP etc).

Parameters:
  `user` - the user to modify the password for
  `newPassword` - the password to change to, encoded by the configured `PasswordEncoder`
Returns:
  the updated UserDetails with the new password