EmailIdpPasswordResetUtil class
Class for handling password reset operations in the email account module.
The main entry point is the startPasswordReset method, which can be used to start a password reset process.
This class also contains utility functions for administration tasks, such as deleting expired password reset requests and password reset attempts.
Constructors
- EmailIdpPasswordResetUtil({required EmailIdpPasswordResetUtilsConfig config, required Argon2HashUtil passwordHashUtils})
- Creates a new EmailIdpPasswordResetUtil instance.
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
-
completePasswordReset(
Session session, {required String completePasswordResetToken, required String newPassword, required Transaction transaction}) → Future< UuidValue> - Returns the auth user ID for the successfully changed password.
-
deletePasswordResetRequestAttempts(
Session session, {required Duration? olderThan, required String? email, required Transaction transaction}) → Future< void> -
Deletes password reset request attempts older than
olderThan. -
deletePasswordResetRequests(
Session session, {required Duration? olderThan, required UuidValue? emailAccountId, required Transaction transaction}) → Future< void> -
Deletes password reset requests older than
olderThan. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setPassword(
Session session, {required EmailAccount emailAccount, required String? password, required Transaction transaction}) → Future< void> - Sets the password for the authentication belonging to the given email account.
-
startPasswordReset(
Session session, {required String email, required Transaction transaction}) → Future< UuidValue> - Sends out a password reset email for the given account, if it exists and returns a password reset request ID, which can be used to complete the reset.
-
toString(
) → String -
A string representation of this object.
inherited
-
verifyPasswordResetCode(
Session session, {required UuidValue passwordResetRequestId, required String verificationCode, required Transaction transaction}) → Future< String> - Returns the credentials for setting the password for the password reset request.
-
withReplacedSecretChallengeException<
T> (Future< T> fn()) → Future<T> - Replaces challenge-related exceptions by email-specific exceptions.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited