CallbackAuthStore class
Callback-backed auth store for focused tests and compatibility adapters.
- Implemented types
Constructors
-
CallbackAuthStore({FutureOr<
AuthUser?> onFindUserById(String id)?, FutureOr<AuthUser?> onFindUserByEmail(String id)?, FutureOr<AuthUser> onCreateUser(AuthUser user)?, FutureOr<AuthUserCreateResult> onCreateOrFindUserByEmail(AuthUser user)?, FutureOr<AuthUser?> onUpdateUser(AuthUser user)?, FutureOr<AuthUser?> onUpdateUserEmail(String userId, String email)?, FutureOr<bool> onDeleteUser(String userId)?, FutureOr<AuthPasswordCredential?> onFindCredential(String identifier)?, FutureOr<AuthPasswordCredential?> onFindCredentialForUser(String identifier)?, FutureOr<AuthUser?> onRegisterCredential(AuthUser user, AuthPasswordCredential credential)?, FutureOr<AuthPasswordCredential?> onUpdateCredential(AuthPasswordCredential credential)?, FutureOr<int> onUpdatePasswordForUser({required String passwordHash, required DateTime updatedAt, required String userId})?, FutureOr<void> onDeleteCredential(String credentialId)?, FutureOr<void> onDeleteCredentialsForUser(String credentialId)?, FutureOr<AuthAccount?> onFindAccount(String providerId, String providerAccountId)?, FutureOr<List< onListAccountsForUser(String userId)?, FutureOr<AuthAccount> >AuthAccount> onLinkAccount(AuthAccount account)?, FutureOr<bool> onUnlinkAccountForUser(String userId, String providerId, String providerAccountId)?, FutureOr<void> onDeleteAccountsForUser(String credentialId)?, FutureOr<AuthSessionRecord?> onFindSession(String tokenHash)?, FutureOr<AuthSessionRecord> onCreateSession(AuthSessionRecord session)?, FutureOr<AuthSessionRecord?> onTouchSession(String tokenHash, DateTime lastUsedAt)?, FutureOr<List< onListSessionsForUser(String userId)?, FutureOr<AuthSessionRecord> >AuthSessionRecord?> onRevokeSession(String tokenHash, {DateTime? revokedAt})?, FutureOr<AuthSessionRecord?> onRevokeSessionById(String userId, String sessionId, {DateTime? revokedAt})?, FutureOr<int> onRevokeAllSessionsForUser(String userId, {DateTime? revokedAt})?, FutureOr<int> onRevokeAllSessionsForUserExcept(String userId, String currentSessionId, {DateTime? revokedAt})?, FutureOr<AuthSessionRecord?> onRotateSession({required String previousTokenHash, required AuthSessionRecord replacement})?, FutureOr<void> onSaveOAuthChallenge(AuthOAuthChallenge challenge)?, FutureOr<AuthOAuthChallenge?> onConsumeOAuthChallenge(String providerId, String state)?, AuthOAuthChallengeStore? oauthChallenges, FutureOr<void> onSavePasswordResetToken(AuthPasswordResetToken token)?, FutureOr<AuthPasswordResetToken?> onConsumePasswordResetToken(String token)?, FutureOr<AuthPasswordResetToken?> onFindPasswordResetToken(String token)?, FutureOr<void> onDeletePasswordResetTokens(String credentialId)?, AuthPasswordResetTokenStore? passwordResetTokens, FutureOr<int> onCurrentJwtVersion(String userId)?, FutureOr<int> onRotateJwtVersion(String userId)?, AuthJwtVersionStore? jwtVersions, FutureOr<void> onSaveVerificationToken(AuthVerificationToken token)?, FutureOr<AuthVerificationToken?> onConsumeVerificationToken(String identifier, String token)?, FutureOr<bool> onDeleteVerificationToken(String identifier, String token)?, FutureOr<void> onDeleteVerificationTokens(String credentialId)?, AuthVerificationTokenStore? verificationTokens, FutureOr<void> onSaveEmailChangeToken(AuthEmailChangeToken token)?, FutureOr<AuthEmailChangeToken?> onConsumeEmailChangeToken(String token)?, FutureOr<bool> onDeleteEmailChangeToken(String identifier, String token)?, FutureOr<void> onDeleteEmailChangeTokens(String credentialId)?, AuthEmailChangeTokenStore? emailChangeTokens, AuthWebAuthnChallengeStore? webAuthnChallenges, AuthWebAuthnAuthenticatorStore? webAuthnAuthenticators, AuthDeviceAuthorizationStore? deviceAuthorizations, AuthEmailOtpStore? emailOtps}) - Creates a store from callbacks for the supported persistence operations.
Properties
- accounts → AuthAccountStore
-
External provider-account persistence operations.
final
- credentials → AuthCredentialStore
-
Password credential persistence operations.
final
- deviceAuthorizations → AuthDeviceAuthorizationStore
-
Device-authorization persistence operations.
final
- emailChangeTokens → AuthEmailChangeTokenStore
-
Email-change token persistence operations.
final
- emailOtps → AuthEmailOtpStore
-
Email one-time-password persistence operations.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- jwtVersions → AuthJwtVersionStore
-
JWT-version persistence operations.
final
- oauthChallenges → AuthOAuthChallengeStore
-
OAuth authorization-challenge persistence operations.
final
- passwordResetTokens → AuthPasswordResetTokenStore
-
Password-reset token persistence operations.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessions → AuthSessionStore
-
Server-side session persistence operations.
final
- users → AuthUserStore
-
User persistence operations.
final
- verificationTokens → AuthVerificationTokenStore
-
Email-verification token persistence operations.
final
- webAuthnAuthenticators → AuthWebAuthnAuthenticatorStore
-
Authenticator store owned by the capability provider.
final
- webAuthnChallenges → AuthWebAuthnChallengeStore
-
Challenge store owned by the capability provider.
final
Methods
-
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