PasswordChange class abstract
The object that can be used to change the password.
Usage example:
class PasswordChangerImpl implements PasswordChanger {
@override
void changePassword(
PasswordChangeContext context,
PasswordChangeHandler handler,
) {
handler.passwords(oldPassword, newPassword);
}
}
[...]
Future<void> changePassword({
required MobileAuthenticationClient client,
required String username,
}) async {
await client.operations.passwordChange
.username(username)
.passwordChanger(PasswordChangerImpl(...))
.onSuccess(() {
// handle success
})
.onError((error) {
// handle error
})
.execute();
}
[...]
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
execute(
) → Future< void> -
Executes the operation asynchronously.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
dynamic onError(PasswordChangeError)) → PasswordChange - Specifies the object that will be invoked when the password could not be changed: the password was not enrolled, the password is locked or the operation was canceled.
-
onSuccess(
Function onSuccess) → PasswordChange - Specifies the object that will be invoked if the password was successfully modified.
-
passwordChanger(
PasswordChanger passwordChanger) → PasswordChange - Specifies the object that will be informed of the potential recoverable errors and is responsible for obtaining the password from the end-user.
-
toString(
) → String -
A string representation of this object.
inherited
-
username(
String username) → PasswordChange - The username whose password must be changed.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited