InMemoryAuthEmailChangeTokenStore class final
Bounded in-memory email-change token store for tests and local development.
Token digests and the normalized user, email, and expiry metadata are retained; the raw token is not. Production stores must provide the same atomic consume and expiry guarantees.
Constructors
- InMemoryAuthEmailChangeTokenStore({DateTime clock()?, int maxTokens = 1024})
-
Creates a bounded store using
clockfor expiry checks.
Properties
Methods
-
captureDeletionState(
) → Object -
Captures the records for rollback by a deletion transaction.
override
-
consume(
String token) → Future< AuthEmailChangeToken?> -
Consumes a matching unexpired token at most once.
override
-
deleteForUser(
String userId) → Future< void> -
Deletes all stored email-change records for
userId.override -
deleteTokenForUser(
String userId, String token) → Future< bool> -
Deletes one matching record for
userIdandtoken.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restoreDeletionState(
Object state) → void -
Restores a snapshot produced by captureDeletionState.
override
-
save(
AuthEmailChangeToken token) → Future< void> -
Saves
tokenafter normalizing its user and email values.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited