SecretChallengeVerificationConfig<T> class

Configuration for challenge verification with all protection mechanisms.

This class provides callbacks for workflow-specific logic while keeping the core verification logic generic and reusable.

Type parameter T represents the request type (e.g., EmailAccountRequest, EmailAccountPasswordResetRequest).

Available extensions

Constructors

SecretChallengeVerificationConfig({required GetRequestCallback<T> getRequest, required bool isAlreadyUsed(T request), required SecretChallenge getChallenge(T request), required bool isExpired(T request), required OnExpiredCallback<T> onExpired, required LinkCompletionTokenCallback<T> linkCompletionToken, RateLimitedRequestAttemptUtil<UuidValue>? rateLimiter})
Creates a new SecretChallengeVerificationConfig.

Properties

getChallenge SecretChallenge Function(T request)
Extracts the challenge from the request.
final
getRequest GetRequestCallback<T>
Retrieves the request by ID.
final
hashCode int
The hash code for this object.
no setterinherited
isAlreadyUsed bool Function(T request)
Checks if the request has already been used/verified.
final
isExpired bool Function(T request)
Checks if the request has expired.
final
linkCompletionToken LinkCompletionTokenCallback<T>
Links the completion token challenge to the request.
final
onExpired OnExpiredCallback<T>
Called when the request has expired.
final
rateLimiter RateLimitedRequestAttemptUtil<UuidValue>?
Optional rate limiting for verification attempts.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

hasTooManyAttempts(Session session, {required UuidValue nonce, Map<String, String>? extraData}) Future<bool>

Available on SecretChallengeVerificationConfig<T>, provided by the SecretChallengeVerificationConfigExtension extension

Records an attempts and checks if the request has too many attempts.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited