pub struct ResetPasswordResource<'a> { /* private fields */ }Expand description
client.reset_password()
Implementations§
Source§impl<'a> ResetPasswordResource<'a>
impl<'a> ResetPasswordResource<'a>
Sourcepub fn create(
&self,
body: &PasswordResetCreate,
) -> Result<PostResetPasswordData>
pub fn create( &self, body: &PasswordResetCreate, ) -> Result<PostResetPasswordData>
Request password reset
POST /reset-password
Requests password-reset emails for active, non-archived accounts matching the stored email address or login name. More than one account can match. The account must already have a password, a previous login or a stored invitation login token. Eligible accounts receive a reset link valid for two weeks. The response always contains a generic translated information message, including when no account matches; it does not reveal which accounts exist or confirm delivery. This public endpoint is rate-limited (normally 20 requests per 60 seconds; configurable through ratelimit.login). Opening a valid reset link creates a password-reset session; submit the new password through PUT /persons/{personId}/password.
§Example
let body = models::PasswordResetCreate {
email_or_username: "alex@example.org".into(),
..Default::default()
};
let result = client.reset_password().create(&body)?;
println!("{:?}", result);