EmailIdpAccountCreationUtil class
This class contains utility functions for the email identity provider account creation.
The main entry point is the startRegistration method, which returns a
UuidValue with the ID of the account request.
This class also contains utility functions for administration tasks, such as deleting expired account creations and verifying account creations.
Constructors
- EmailIdpAccountCreationUtil({required EmailIdpAccountCreationUtilsConfig config, required Argon2HashUtil passwordHashUtils, required AuthUsers authUsers})
- Creates a new EmailIdpAccountCreationUtil 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
-
completeAccountCreation(
Session session, {required String completeAccountCreationToken, required String password, required Transaction transaction}) → Future< EmailIdpCompleteAccountCreationResult> - The last step in the account creation process.
-
createEmailAuthentication(
Session session, {required UuidValue authUserId, required String email, required String? password, required Transaction transaction}) → Future< UuidValue> - Creates an email authentication for the auth user with the given email and password.
-
deleteEmailAccountRequestById(
Session session, UuidValue accountRequestId, {required Transaction transaction}) → Future< void> - Deletes an account request by its ID.
-
deleteExpiredAccountRequests(
Session session, {required Transaction transaction}) → Future< void> - Deletes expired account creation requests.
-
findActiveEmailAccountRequest(
Session session, {required UuidValue accountRequestId, required Transaction? transaction}) → Future< EmailAccountRequest?> - Checks whether an email account request is still pending, and if so returns the associated request.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startRegistration(
Session session, {required String email, required Transaction transaction}) → Future< UuidValue> - Starts the account creation process for creating a new email account.
-
toString(
) → String -
A string representation of this object.
inherited
-
verifyRegistrationCode(
Session session, {required UuidValue accountRequestId, required String verificationCode, required Transaction transaction}) → Future< String> - Method for verifying the account request code returned by startRegistration.
-
withReplacedSecretChallengeException<
T> (Future< T> fn()) → Future<T> - Replaces challenge-related exceptions by email-specific exceptions.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited