1pub mod adapter;
2mod contracts;
3mod database_hooks;
4mod decorated;
5mod jwks;
6mod migrations;
7pub mod oauth_clients;
8mod org_extensions;
9pub mod scim;
10mod scim_group_patch;
11pub use scim_group_patch::{
12 ScimGroupPatch, ScimGroupPatchKind, ScimGroupPatchOperation, apply_scim_group_patch,
13 check_scim_group_cardinality, prepare_scim_group_patch,
14};
15mod secondary_sessions;
16pub mod secondary_storage;
17mod session_deletion;
18mod sso;
19pub mod stateless;
20mod wallets;
21use crate::schema::AuthSchema;
22pub(crate) use contracts::UserCreateTransform;
23use contracts::create_data;
24pub use contracts::{
25 AccountStore, AdapterAfterHook, AdapterEvent, AfterCommitErrorPolicy, ApiKeyStore,
26 AuthTransaction, BoxedTransactionValue, ConsumeApiKeyResult, DeviceCodeStore,
27 InvitationCreateOptions, InvitationStore, ListOrganizationMembersParams, MemberPageQuery,
28 MemberStore, NumericTextInput, OrganizationStore, PasskeyStore, SessionCreatedHook,
29 SessionStore, TransactionFuture, TransactionStore, TransactionWork, TwoFactorStore,
30 TypedTransactionFuture, UserCreationDefaults, UserStore, VerificationStore, transaction,
31 transaction_with_policy, verification_reservation_key,
32};
33pub use database_hooks::{DatabaseHookContext, DatabaseHooks, HookBackend, HookControl};
34pub(crate) use decorated::{
35 AdapterCallbacks, PluginStore, SessionCreatedCallbacks, UserTransforms,
36};
37pub use jwks::JwkStore;
38pub use migrations::SchemaMigrator;
39pub use oauth_clients::{
40 CreateOAuthClient, CreateOAuthClientResource, CreateOAuthConsent, CreateOAuthResource,
41 CreateOAuthToken, OAuthClient, OAuthClientResource, OAuthClientStore, OAuthConsent,
42 OAuthResource, OAuthToken, OAuthTokenKind,
43};
44pub use org_extensions::{OrganizationRoleStore, TeamStore, team_membership_key};
45pub use scim::{
46 CreateScimGroup, CreateScimManagedConnection, CreateScimProjectionGrant, CreateScimUser,
47 DecommissionScimManagedConnection, ReplaceScimGroup, ReplaceScimUser,
48 RevokeScimManagedCredential, RotateScimManagedCredential, ScimAuthorizationSource,
49 ScimConnectionBinding, ScimGroupMemberRecord, ScimGroupMemberships, ScimGroupPage,
50 ScimGroupRecord, ScimIdentitySource, ScimIdentityState, ScimIdentityTombstone,
51 ScimManagedConnection, ScimManagedConnectionEvent, ScimManagedConnectionState,
52 ScimManagedCreation, ScimManagedCredential, ScimManagedStore, ScimProjectedUserState,
53 ScimProjectionCandidate, ScimProjectionPreparedUser, ScimRoleExistenceInput,
54 ScimRoleMappingInput, ScimUserAttributes, ScimUserMutationContext, ScimUserPage,
55 ScimUserRecord, scim_group_membership_key,
56};
57#[cfg(feature = "redis-cache")]
58pub use secondary_storage::RedisAdapter;
59pub use secondary_storage::{CacheAdapter, MemoryCacheAdapter};
60pub(crate) use session_deletion::SessionDeletionHooks;
61pub use session_deletion::{SessionDeletionHook, SessionDeletionWork};
62pub use sso::{
63 SsoFieldType, SsoProvider, SsoProviderStore, SsoProviderUpdate, SsoProviderUpdateWork,
64 prepare_sso_fields, project_sso_provider, sso_field_column, sso_field_definition,
65 validate_sso_fields,
66};
67pub use wallets::WalletAddressStore;
68
69pub trait AuthStore<S: AuthSchema>:
70 UserStore<S>
71 + SessionStore<S>
72 + AccountStore<S>
73 + VerificationStore<S>
74 + OrganizationStore
75 + MemberStore
76 + InvitationStore
77 + OAuthClientStore
78 + SsoProviderStore
79 + ScimManagedStore
80 + TeamStore
81 + OrganizationRoleStore
82 + WalletAddressStore
83 + TwoFactorStore
84 + ApiKeyStore
85 + PasskeyStore
86 + DeviceCodeStore
87 + JwkStore
88 + TransactionStore<S>
89 + Send
90 + Sync
91{
92}
93
94impl<S, T> AuthStore<S> for T
95where
96 S: AuthSchema,
97 T: UserStore<S>
98 + SessionStore<S>
99 + AccountStore<S>
100 + VerificationStore<S>
101 + OrganizationStore
102 + MemberStore
103 + InvitationStore
104 + OAuthClientStore
105 + SsoProviderStore
106 + ScimManagedStore
107 + TeamStore
108 + OrganizationRoleStore
109 + WalletAddressStore
110 + TwoFactorStore
111 + ApiKeyStore
112 + PasskeyStore
113 + DeviceCodeStore
114 + JwkStore
115 + TransactionStore<S>
116 + Send
117 + Sync,
118{
119}