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