The object that can be used to change the password.

Usage example:

class PasswordChangerImpl implements PasswordChanger {
async changePassword(context: PasswordChangeContext, handler: PasswordChangeHandler) {
handler.passwords(oldPassword, newPassword);
}
}

[...]
async changePassword({
client: MobileAuthenticationClient,
username: string,
}): Promise<void> {
await client.operations.passwordChange
.username(username)
.passwordChanger(PasswordChangerImpl(...))
.onSuccess(() {
// handle success
})
.onError((error) {
// handle error
})
.execute();
}
[...]

Hierarchy (View Summary)

Methods

  • Executes the operation asynchronously.

    Returns Promise<void>

  • Specifies the object that will be invoked if the password was successfully modified.

    IMPORTANT
    Providing the onSuccess is required.

    Parameters

    • onSuccess: () => void

      the callback which is invoked on successful password modification.

    Returns PasswordChange

    a PasswordChange object.