1pub mod adapter;
2mod contracts;
3mod database_hooks;
4mod decorated;
5mod jwks;
6mod migrations;
7pub mod oauth_clients;
8mod org_extensions;
9mod secondary_sessions;
10pub mod secondary_storage;
11pub mod stateless;
12mod wallets;
13
14use crate::schema::AuthSchema;
15pub(crate) use contracts::UserCreateTransform;
16use contracts::create_data;
17pub use contracts::{
18 AccountStore, AdapterAfterHook, AdapterEvent, ApiKeyStore, AuthTransaction,
19 BoxedTransactionValue, ConsumeApiKeyResult, DeviceCodeStore, InvitationCreateOptions,
20 InvitationStore, ListOrganizationMembersParams, MemberPageQuery, MemberStore, NumericTextInput,
21 OrganizationStore, PasskeyStore, SessionCreatedHook, SessionStore, TransactionFuture,
22 TransactionStore, TransactionWork, TwoFactorStore, TypedTransactionFuture,
23 UserCreationDefaults, UserStore, VerificationStore, transaction, verification_reservation_key,
24};
25pub use database_hooks::{DatabaseHookContext, DatabaseHooks, HookBackend, HookControl};
26pub(crate) use decorated::{
27 AdapterCallbacks, PluginStore, SessionCreatedCallbacks, UserTransforms,
28};
29pub use jwks::JwkStore;
30pub use migrations::SchemaMigrator;
31pub use oauth_clients::{
32 CreateOAuthClient, CreateOAuthClientResource, CreateOAuthConsent, CreateOAuthResource,
33 CreateOAuthToken, OAuthClient, OAuthClientResource, OAuthClientStore, OAuthConsent,
34 OAuthResource, OAuthToken, OAuthTokenKind,
35};
36pub use org_extensions::{OrganizationRoleStore, TeamStore, team_membership_key};
37#[cfg(feature = "redis-cache")]
38pub use secondary_storage::RedisAdapter;
39pub use secondary_storage::{CacheAdapter, MemoryCacheAdapter};
40pub use wallets::WalletAddressStore;
41
42pub trait AuthStore<S: AuthSchema>:
43 UserStore<S>
44 + SessionStore<S>
45 + AccountStore<S>
46 + VerificationStore<S>
47 + OrganizationStore
48 + MemberStore
49 + InvitationStore
50 + OAuthClientStore
51 + TeamStore
52 + OrganizationRoleStore
53 + WalletAddressStore
54 + TwoFactorStore
55 + ApiKeyStore
56 + PasskeyStore
57 + DeviceCodeStore
58 + JwkStore
59 + TransactionStore<S>
60 + Send
61 + Sync
62{
63}
64
65impl<S, T> AuthStore<S> for T
66where
67 S: AuthSchema,
68 T: UserStore<S>
69 + SessionStore<S>
70 + AccountStore<S>
71 + VerificationStore<S>
72 + OrganizationStore
73 + MemberStore
74 + InvitationStore
75 + OAuthClientStore
76 + TeamStore
77 + OrganizationRoleStore
78 + WalletAddressStore
79 + TwoFactorStore
80 + ApiKeyStore
81 + PasskeyStore
82 + DeviceCodeStore
83 + JwkStore
84 + TransactionStore<S>
85 + Send
86 + Sync,
87{
88}