UpdatePassword()
Changes an existing user’s password.
pub async fn update_password(&self, request: UpdatePasswordRequest) -> Result<()>
The password change is applied server-side; subsequent requests authenticate with the new password.
Request Syntax
let request = UpdatePasswordRequest::builder()
.username("alice")
.old_password("old_password")
.new_password("new_password")
.build()?;
REQUEST FIELDS:
username: StringName of the user whose password is changed. Required.
old_password: StringCurrent password of the user. Required.
new_password: StringNew password of the user. Required.
RETURN TYPE:
Result<()>
RETURNS:
Returns Ok(()) on success; returns an Error on failure.
Example
let request = UpdatePasswordRequest::builder()
.username("alice")
.old_password("old_password")
.new_password("new_password")
.build()?;
client.update_password(request).await?;