Skip to main content

SqlxStore

Struct SqlxStore 

Source
pub struct SqlxStore<S: AuthSchema> { /* private fields */ }

Implementations§

Source§

impl<S: AuthSchema> SqlxStore<S>

Source

pub fn new( config: impl Into<Arc<AuthConfig>>, pool: impl Into<SqlxPool>, ) -> Self

Source

pub fn with_organization_models(self, models: OrganizationModels) -> Self

Bind the organization plugin to application-owned tables.

Source

pub fn with_hooks( self, hooks: Vec<Arc<dyn DatabaseHooks<S, SqlxBackend>>>, ) -> Self

Source

pub fn hook<H: DatabaseHooks<S, SqlxBackend> + 'static>(self, hook: H) -> Self

Source

pub const fn pool(&self) -> &SqlxPool

Source

pub const fn config(&self) -> &Arc<AuthConfig> ⓘ

Trait Implementations§

Source§

impl<S> AccountStore<S> for SqlxStore<S>

Source§

fn provider_token_text<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 Value, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Apply the physical token TEXT column’s scalar affinity before persistence. SQL adapters override this for their own boolean/numeric representation.
Source§

fn create_account<'life0, 'async_trait>( &'life0 self, create_account: CreateAccount, ) -> Pin<Box<dyn Future<Output = AuthResult<S::Account>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_account<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, provider: &'life1 str, provider_account_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Account>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Resolve a global provider identity only when exactly one physical row matches. Duplicate rows (including duplicates owned by one user) must return DatabaseError::AmbiguousAccount; choosing a row would make ownership arbitrary.
Source§

fn get_user_accounts<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<S::Account>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return all scoped physical rows in the adapter’s native order. Do not select or collapse duplicate provider identities, or sort by mutable dates.
Source§

fn update_account<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateAccount, ) -> Pin<Box<dyn Future<Output = AuthResult<S::Account>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_account<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn create_account_record<'life0, 'async_trait>( &'life0 self, create_account: CreateAccount, ) -> Pin<Box<dyn Future<Output = Result<AdapterRecord<<S as AuthSchema>::Account>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn get_account_record<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, provider: &'life1 str, provider_account_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AdapterRecord<<S as AuthSchema>::Account>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn get_credential_account_record<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AdapterRecord<<S as AuthSchema>::Account>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy. Retain the selected physical credential result. Initialization applies output policy only to that selected row, never unrelated linked accounts.
Source§

fn get_user_accounts_record<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AdapterRecord<<S as AuthSchema>::Account>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source§

fn update_account_record<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateAccount, ) -> Pin<Box<dyn Future<Output = Result<AdapterRecord<<S as AuthSchema>::Account>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

impl<S> ApiKeyStore for SqlxStore<S>
where S: AuthSchema + Send + Sync,

Source§

fn consume_api_key_usage_from_snapshot<'life0, 'life1, 'async_trait>( &'life0 self, observed: &'life1 ApiKey, global_rate_limit_enabled: bool, ) -> Pin<Box<dyn Future<Output = AuthResult<ConsumeApiKeyResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Consume usage from the validated database snapshot with Source write phases. Quota/refill and rate claims are independently guarded atomic writes; successful earlier writes survive a later storage failure. Finally touch updated_at and return the current row. This is distinct from the combined transactional operation above and cannot be supplied by delegating to it.
Source§

fn create_api_key<'life0, 'async_trait>( &'life0 self, input: CreateApiKey, ) -> Pin<Box<dyn Future<Output = AuthResult<ApiKey>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_api_key_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ApiKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_api_key_by_hash<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ApiKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_api_keys_by_reference<'life0, 'life1, 'async_trait>( &'life0 self, reference_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<ApiKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_api_key<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateApiKey, ) -> Pin<Box<dyn Future<Output = AuthResult<ApiKey>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn consume_api_key_usage<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, global_rate_limit_enabled: bool, ) -> Pin<Box<dyn Future<Output = AuthResult<ConsumeApiKeyResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically consume one use of an API key: decrement remaining (with refill), increment rate-limit counter, and update timestamps. Read more
Source§

fn delete_api_key<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_expired_api_keys<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = AuthResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<S: Clone + AuthSchema> Clone for SqlxStore<S>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: AuthSchema> Debug for SqlxStore<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S> DeviceCodeStore for SqlxStore<S>
where S: AuthSchema + Send + Sync,

Source§

fn create_device_code<'life0, 'async_trait>( &'life0 self, input: CreateDeviceCode, ) -> Pin<Box<dyn Future<Output = AuthResult<DeviceCode>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Persist a newly-issued device code.
Source§

fn create_device_code_with_fields<'life0, 'async_trait>( &'life0 self, input: CreateDeviceCode, fields: Map<String, Value>, ) -> Pin<Box<dyn Future<Output = AuthResult<DeviceCode>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Atomically persist a grant with application-owned fields.
Source§

fn device_code_fields<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Map<String, Value>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read the durable application fields belonging to a device record.
Source§

fn consume_device_code<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: &'life1 str, status: &'life2 str, ownership: &'life3 Map<String, Value>, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<DeviceCode>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Consume exactly one approved grant matching all application ownership predicates.
Source§

fn get_device_code_by_device_code<'life0, 'life1, 'async_trait>( &'life0 self, device_code: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<DeviceCode>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch a device code by its opaque device-facing token.
Source§

fn get_device_code_by_user_code<'life0, 'life1, 'async_trait>( &'life0 self, user_code: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<DeviceCode>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch a device code by its user-facing verification code.
Source§

fn update_device_code<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateDeviceCode, ) -> Pin<Box<dyn Future<Output = AuthResult<DeviceCode>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update mutable device-code state such as approval status or poll time.
Source§

fn update_device_code_if_status<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, current_status: &'life2 str, update: UpdateDeviceCode, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update a device code only when it still has the expected status. Read more
Source§

fn claim_device_code<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Bind a still-pending, still-unclaimed device code to a user. Read more
Source§

fn delete_device_code<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete a device code record.
Source§

fn delete_device_code_if_status<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, status: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete a device code only when it still has the expected status. Read more
Source§

impl<S> InvitationStore for SqlxStore<S>

Source§

fn create_invitation<'life0, 'async_trait>( &'life0 self, invitation: CreateInvitation, ) -> Pin<Box<dyn Future<Output = AuthResult<Invitation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn create_invitation_with_options<'life0, 'async_trait>( &'life0 self, invitation: CreateInvitation, options: InvitationCreateOptions, ) -> Pin<Box<dyn Future<Output = AuthResult<Invitation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_invitation_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Invitation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_invitation_team_ids<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, team_ids: Option<String>, ) -> Pin<Box<dyn Future<Output = AuthResult<Invitation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn accept_invitation_with_teams<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, invitation_id: &'life1 str, user_id: &'life2 str, session_token: &'life3 str, team_limits: &'life4 [(String, Option<f64>)], membership_limit: Option<usize>, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<(Invitation, Member)>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Claim a pending invitation and persist memberships/session scope in one transition.
Source§

fn update_invitation_status_if_status<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, expected: InvitationStatus, status: InvitationStatus, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Invitation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically change only an invitation still at the expected status and return the actual updated row. A mismatch or missing row returns None. This write commits independently of a later membership transaction.
Source§

fn pending_invitation_page<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, org_id: &'life1 str, email: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Invitation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Actual adapter page of pending rows, before expiry filtering.
Source§

fn update_invitation_expiry<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, expires_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<Invitation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update expiry independently; reissue retains every other invitation field.
Source§

fn get_pending_invitation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, org_id: &'life1 str, email: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Invitation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn update_invitation_status<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, status: InvitationStatus, ) -> Pin<Box<dyn Future<Output = AuthResult<Invitation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_organization_invitations<'life0, 'life1, 'async_trait>( &'life0 self, org_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Invitation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn count_pending_organization_invitations<'life0, 'life1, 'async_trait>( &'life0 self, org_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<i64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count still-pending, unexpired invitations for an organization.
Source§

fn list_user_invitations<'life0, 'life1, 'async_trait>( &'life0 self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Invitation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<S: AuthSchema> JwkStore for SqlxStore<S>

Source§

fn list_jwks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Jwk>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

All keys, including expired signing keys that remain valid for public verification.
Source§

fn get_jwk_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Jwk>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn create_jwk<'life0, 'async_trait>( &'life0 self, data: CreateJwk, ) -> Pin<Box<dyn Future<Output = AuthResult<Jwk>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<S> MemberStore for SqlxStore<S>
where S: AuthSchema + Send + Sync,

Source§

fn create_member<'life0, 'async_trait>( &'life0 self, member: CreateMember, ) -> Pin<Box<dyn Future<Output = AuthResult<Member>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_member<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Member>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_member_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Member>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_member_role<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, member_id: &'life1 str, role: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Member>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn update_member_role_if_present<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, member_id: &'life1 str, role: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Member>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update a matching member while preserving adapter model hooks. Absence is None; other storage failures remain errors.
Source§

fn delete_member<'life0, 'life1, 'async_trait>( &'life0 self, member_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, org_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Member>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_member_with_context<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, member_id: &'life1 str, organization_id: &'life2 str, user_id: &'life3 str, remove_team_members: bool, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Delete the authorized original member, then optionally release its team memberships atomically. The original scope/user remains authoritative if a lifecycle callback independently changes or removes the stored member. A missing/ignored member deletion is successful; SQL errors are failures.
Source§

fn list_organization_members_page<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, limit: usize, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Member>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the adapter’s organization-scoped page without imposing a sort. Used for the source’s paged last-owner guard independently of total count.
Source§

fn query_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, params: &'life1 ListOrganizationMembersParams, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<Member>, usize)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Query organization members with filter, sort, and pagination applied in the store when possible.
Source§

fn query_organization_members_page<'life0, 'life1, 'async_trait>( &'life0 self, params: &'life1 MemberPageQuery, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<Member>, usize)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Apply raw numeric pagination without converting it into the legacy usize API.
Source§

fn count_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, org_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<i64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn count_organization_owners<'life0, 'life1, 'async_trait>( &'life0 self, org_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<i64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<S: AuthSchema> OAuthClientStore for SqlxStore<S>

Source§

fn claim_oauth_client_assertion<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, expires_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically claim a caller-supplied assertion digest; false means it already exists.
Source§

fn store_oauth_refresh_replay<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, ciphertext: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Claim default refresh rotation with both revocation and rotation timestamps.
Source§

fn claim_oauth_refresh_rotation<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, at: DateTime<Utc>, replay_expires: Option<DateTime<Utc>>, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn claim_oauth_refresh_rotation_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, at: DateTime<Utc>, replay_expires: Option<DateTime<Utc>>, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically rotate the retained row supplied to a trusted grant handler.
Source§

fn mark_oauth_token_revoked<'life0, 'life1, 'async_trait>( &'life0 self, kind: OAuthTokenKind, id: &'life1 str, at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_oauth_tokens_for_session<'life0, 'life1, 'async_trait>( &'life0 self, kind: OAuthTokenKind, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<OAuthToken>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_oauth_token<'life0, 'life1, 'async_trait>( &'life0 self, kind: OAuthTokenKind, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn revoke_oauth_refresh_token<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, revoked_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically claim an unrevoked refresh token; concurrent claimants lose.
Source§

fn delete_oauth_access_tokens_for_refresh<'life0, 'life1, 'async_trait>( &'life0 self, refresh_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_oauth_refresh_family<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, client_id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn create_oauth_token<'life0, 'async_trait>( &'life0 self, kind: OAuthTokenKind, data: CreateOAuthToken, ) -> Pin<Box<dyn Future<Output = AuthResult<OAuthToken>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_oauth_token<'life0, 'life1, 'async_trait>( &'life0 self, kind: OAuthTokenKind, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<OAuthToken>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_oauth_tokens_for_code<'life0, 'life1, 'async_trait>( &'life0 self, code: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_oauth_client_resource<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, client_id: &'life1 str, resource_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn create_oauth_client_resource<'life0, 'async_trait>( &'life0 self, data: CreateOAuthClientResource, ) -> Pin<Box<dyn Future<Output = AuthResult<OAuthClientResource>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete_oauth_resource<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_oauth_resource<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, metadata: Value, updated_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<OAuthResource>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_oauth_resources<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<OAuthResource>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_oauth_client_resources<'life0, 'life1, 'async_trait>( &'life0 self, client_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<OAuthClientResource>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn create_oauth_resource<'life0, 'async_trait>( &'life0 self, data: CreateOAuthResource, ) -> Pin<Box<dyn Future<Output = AuthResult<OAuthResource>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_oauth_resource<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<OAuthResource>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_oauth_consents_by_user<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<OAuthConsent>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn create_oauth_client<'life0, 'async_trait>( &'life0 self, data: CreateOAuthClient, ) -> Pin<Box<dyn Future<Output = AuthResult<OAuthClient>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_oauth_client<'life0, 'life1, 'async_trait>( &'life0 self, client_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<OAuthClient>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_oauth_clients_by_user<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<OAuthClient>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_oauth_client<'life0, 'life1, 'async_trait>( &'life0 self, client_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_oauth_client_secret<'life0, 'life1, 'async_trait>( &'life0 self, client_id: &'life1 str, secret: String, updated_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<OAuthClient>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_oauth_client_metadata<'life0, 'life1, 'async_trait>( &'life0 self, client_id: &'life1 str, metadata: Value, updated_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<OAuthClient>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<S: AuthSchema> OrganizationRoleStore for SqlxStore<S>

Source§

fn create_organization_role<'life0, 'async_trait>( &'life0 self, data: CreateOrganizationRole, ) -> Pin<Box<dyn Future<Output = AuthResult<OrganizationRole>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_organization_role<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: &'life1 str, selector: &'life2 OrganizationRoleSelector, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<OrganizationRole>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn list_organization_roles<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<OrganizationRole>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn count_organization_roles<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count all roles in the organization independently of the list query limit.
Source§

fn has_organization_role_members<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: &'life1 str, role: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Check exact comma-separated membership roles in the configured adapter page. The organization and role substring predicates are applied before pagination.
Source§

fn update_organization_role<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: &'life1 str, selector: &'life2 OrganizationRoleSelector, update: UpdateOrganizationRole, ) -> Pin<Box<dyn Future<Output = AuthResult<OrganizationRole>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn delete_organization_role<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: &'life1 str, selector: &'life2 OrganizationRoleSelector, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

impl<S> OrganizationStore for SqlxStore<S>
where S: AuthSchema + Send + Sync,

Source§

fn create_organization<'life0, 'async_trait>( &'life0 self, org: CreateOrganization, ) -> Pin<Box<dyn Future<Output = AuthResult<Organization>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_organization_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Organization>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_organization_by_slug<'life0, 'life1, 'async_trait>( &'life0 self, slug: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Organization>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_organizations_by_ids<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Organization>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch multiple organizations by id. Read more
Source§

fn update_organization<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateOrganization, ) -> Pin<Box<dyn Future<Output = AuthResult<Organization>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn patch_organization_if_present<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateOrganization, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Organization>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Apply exactly the supplied organization columns as a database patch. Returns absence separately from database errors. Empty patches are sent to the adapter rather than converted into timestamp-only updates. Custom stores serving the default HTTP update route must implement this bounded operation; the default fails closed with NotImplemented. Model callbacks belong to update_organization_if_present instead.
Source§

fn update_organization_if_present<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateOrganization, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Organization>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update a matching organization, retaining adapter model hooks. None means no row was updated; other storage failures remain errors. Custom stores must implement this optional-row operation explicitly.
Source§

fn delete_organization<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete the organization and its members/invitations atomically. Extension rows (teams, roles, API keys) and sessions are retained, matching the pinned default adapter. Custom adapters own their constraint policy.
Source§

fn list_user_organizations<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Organization>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<S: AuthSchema + Send + Sync> PasskeyStore for SqlxStore<S>

Source§

fn create_passkey<'life0, 'async_trait>( &'life0 self, input: CreatePasskey, ) -> Pin<Box<dyn Future<Output = AuthResult<Passkey>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_passkey_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Passkey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_passkey_by_credential_id<'life0, 'life1, 'async_trait>( &'life0 self, credential_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Passkey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_passkeys_by_user<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Passkey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_passkey_authentication<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdatePasskeyAuthentication, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Passkey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update the verified credential, returning None if application code removed its row. Storage failures remain errors; an absent row does not invalidate completed verification.
Source§

fn update_passkey_name<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, name: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Passkey>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn delete_passkey<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<S: AuthSchema> SchemaMigrator for SqlxStore<S>

Installs the bundled auth schema in better_auth_migrations, the ledger the SeaORM adapter also records.

Source§

fn migrate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Apply every pending migration; already applied migrations are skipped. Read more
Source§

impl<S: AuthSchema> ScimManagedStore for SqlxStore<S>

Source§

fn find_scim_identity_tombstone<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, connection: &'life1 str, key: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ScimIdentityTombstone>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn scim_user_domain_stable<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, connection: &'life1 str, domain: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn list_scim_users<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, connection: &'life1 str, filters: &'life2 [(String, String)], offset: i64, count: i64, ) -> Pin<Box<dyn Future<Output = AuthResult<ScimUserPage>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn scim_group_domain_stable<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, connection: &'life1 str, domain: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn list_scim_groups<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, connection: &'life1 str, filters: &'life2 [(String, String)], offset: i64, count: i64, ) -> Pin<Box<dyn Future<Output = AuthResult<ScimGroupPage>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_scim_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, connection: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ScimUserRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn find_scim_managed_credential<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ScimManagedCredential>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn find_scim_active_managed_connection<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ScimManagedConnection>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn record_scim_credential_use<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, previous: Option<DateTime<Utc>>, at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_scim_group<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, connection: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ScimGroupRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn scim_group_members<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, connection: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<ScimGroupMemberships>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn scim_projection_candidates<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, domain: &'life1 str, cursor: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<ScimProjectionCandidate>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn acquire_scim_decommission_lease<'life0, 'async_trait>( &'life0 self, binding: ScimConnectionBinding, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ScimConnectionBinding>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn release_scim_decommission_lease<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, lease: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn terminal_scim_connection_binding<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: &'life1 str, domain: Option<&'life2 str>, key: &'life3 str, ) -> Pin<Box<dyn Future<Output = AuthResult<ScimConnectionBinding>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn active_scim_connection_binding<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: &'life1 str, domain: &'life2 str, key: &'life3 str, ) -> Pin<Box<dyn Future<Output = AuthResult<ScimConnectionBinding>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn list_scim_managed_connection_events<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, domain: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Vec<ScimManagedConnectionEvent>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn decommission_scim_managed_connection<'life0, 'async_trait>( &'life0 self, data: DecommissionScimManagedConnection, complete: bool, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ScimManagedConnection>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn revoke_scim_managed_credential<'life0, 'async_trait>( &'life0 self, data: RevokeScimManagedCredential, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ScimManagedConnection>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn rotate_scim_managed_credential<'life0, 'async_trait>( &'life0 self, data: RotateScimManagedCredential, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ScimManagedCreation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_scim_managed_connection<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, domain: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<ScimManagedConnectionState>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn list_scim_managed_connections<'life0, 'life1, 'async_trait>( &'life0 self, domain: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<ScimManagedConnection>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn create_scim_managed_connection<'life0, 'async_trait>( &'life0 self, data: CreateScimManagedConnection, ) -> Pin<Box<dyn Future<Output = AuthResult<ScimManagedCreation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Insert one connection, its credential, and both ordered events in one transaction. Read more
Source§

impl<S> SessionStore<S> for SqlxStore<S>

Source§

fn prepare_secondary_session_creation<'life0, 'async_trait>( &'life0 self, input: CreateSession, persist: bool, ) -> Pin<Box<dyn Future<Output = AuthResult<S::Session>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stage a secondary session through creation hooks and optional physical persistence. The caller publishes the cache before completing its after hooks.
Source§

fn complete_secondary_session_creation<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 S::Session, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Complete creation hooks after the actual secondary writes succeed.
Source§

fn prepare_secondary_session_update<'life0, 'async_trait>( &'life0 self, session: S::Session, expires_at: Option<DateTime<Utc>>, fields: FieldValues, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<(S::Session, FieldValues)>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Bind a trusted secondary update once, retaining hook-mutated fields for physical publication.
Source§

fn complete_secondary_session_update<'life0, 'async_trait>( &'life0 self, session: S::Session, expires_at: Option<DateTime<Utc>>, fields: FieldValues, persist: bool, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Publish the staged physical update and run after hooks exactly once.
Source§

fn end_session_preserving<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

End a still-live physical session without deleting its audit row.
Source§

fn end_user_sessions_preserving<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

End all live session rows for one owner while retaining audit history.
Source§

fn create_session<'life0, 'async_trait>( &'life0 self, create_session: CreateSession, ) -> Pin<Box<dyn Future<Output = AuthResult<S::Session>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_session_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read the physical session row by its ID for signed-token liveness.
Source§

fn get_session<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_sessions_by_tokens<'life0, 'life1, 'async_trait>( &'life0 self, tokens: &'life1 [String], ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch matching sessions once each, including expired rows. The bundled SQLite adapter returns token-index order rather than request order.
Source§

fn get_user_sessions<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_session_fields<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, fields: FieldValues, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Persist already authorized fields for the currently authenticated token.
Source§

fn update_session_expiry<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, expires_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn refresh_session<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, expires_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Refresh the persisted expiry and return the updated snapshot. A session removed before the update returns None, never its old credentials.
Source§

fn refresh_session_with_fields<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, expires_at: DateTime<Utc>, fields: FieldValues, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Refresh expiry and configured fields in one physical update. Adapters supporting additional values must override this operation so their actual before hooks precede binding and their after hooks see the final row. The fallback preserves plain refresh and fails closed on additional writes.
Source§

fn delete_session<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_user_sessions<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_expired_sessions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = AuthResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn update_session_active_organization<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, token: &'life1 str, organization_id: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = AuthResult<S::Session>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn update_session_active_team<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, token: &'life1 str, team_id: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = AuthResult<S::Session>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_session_user<'life0, 'life1, 'async_trait>( &'life0 self, _token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<<S as AuthSchema>::User>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

A typed user snapshot belonging to an authenticated session. The default signals that the caller must use its physical user store.
Source§

fn get_session_user_record<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AdapterRecord<<S as AuthSchema>::User>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Retain declared adapter output for a secondary-backed session owner.
Source§

fn create_session_record<'life0, 'async_trait>( &'life0 self, create_session: CreateSession, ) -> Pin<Box<dyn Future<Output = Result<AdapterRecord<<S as AuthSchema>::Session>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn get_session_record<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AdapterRecord<<S as AuthSchema>::Session>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn get_sessions_by_tokens_record<'life0, 'life1, 'async_trait>( &'life0 self, tokens: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<Vec<AdapterRecord<<S as AuthSchema>::Session>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn get_user_sessions_record<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AdapterRecord<<S as AuthSchema>::Session>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn get_active_user_sessions_record<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AdapterRecord<<S as AuthSchema>::Session>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return active physical sessions after declared output transforms. Expiry selection runs before application callbacks, without trusting output fields.
Source§

fn refresh_session_record<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, expires_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<Option<AdapterRecord<<S as AuthSchema>::Session>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn update_session_fields_record<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, fields: FieldValues, ) -> Pin<Box<dyn Future<Output = Result<Option<AdapterRecord<<S as AuthSchema>::Session>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn update_session_active_organization_record<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, token: &'life1 str, organization_id: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<AdapterRecord<<S as AuthSchema>::Session>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn update_session_active_team_record<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, token: &'life1 str, team_id: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<AdapterRecord<<S as AuthSchema>::Session>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

impl<S: AuthSchema> SsoProviderStore for SqlxStore<S>

Source§

fn mark_sso_domain_verified<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, domain: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn update_sso_provider<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: &'life1 str, provider_id: &'life2 str, prepare: &'life3 SsoProviderUpdateWork, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<SsoProvider>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn delete_sso_provider_and_accounts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, provider_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Atomically retire a provider and every account linked to its identity namespace.
Source§

fn list_sso_providers<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<SsoProvider>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn create_sso_provider<'life0, 'async_trait>( &'life0 self, row: SsoProvider, ) -> Pin<Box<dyn Future<Output = AuthResult<SsoProvider>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_sso_provider<'life0, 'life1, 'async_trait>( &'life0 self, provider_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<SsoProvider>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_sso_providers_by_user<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<SsoProvider>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<S> TeamStore for SqlxStore<S>

Source§

fn create_team<'life0, 'async_trait>( &'life0 self, data: CreateTeam, ) -> Pin<Box<dyn Future<Output = AuthResult<Team>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_team<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: Option<&'life1 str>, team_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Team>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn list_teams<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Team>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_team<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: &'life1 str, team_id: &'life2 str, update: UpdateTeam, ) -> Pin<Box<dyn Future<Output = AuthResult<Team>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn delete_team<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: &'life1 str, team_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Remove the scoped team, its memberships, and its IDs from pending invitations atomically.
Source§

fn get_team_member<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, team_id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<TeamMember>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn add_team_member<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, team_id: &'life1 str, user_id: &'life2 str, maximum: Option<f64>, ) -> Pin<Box<dyn Future<Output = AuthResult<AddTeamMemberResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Existing membership is idempotent, including when the capacity has since been reached. maximum is a raw Source Number bound to the durable seat predicate; custom stores must not round or cap it. Integer callers migrate to Some(3.0); None retains unlimited admission.
Source§

fn remove_team_member<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, team_id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn list_team_members<'life0, 'life1, 'async_trait>( &'life0 self, team_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<TeamMember>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_user_teams<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Team>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<S> TransactionStore<S> for SqlxStore<S>

Source§

fn transaction_boxed<'life0, 'async_trait>( &'life0 self, work: Box<TransactionWork<S>>, ) -> Pin<Box<dyn Future<Output = AuthResult<BoxedTransactionValue>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn transaction_boxed_with_policy<'life0, 'async_trait>( &'life0 self, work: Box<TransactionWork<S>>, policy: AfterCommitErrorPolicy, ) -> Pin<Box<dyn Future<Output = AuthResult<BoxedTransactionValue>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<S> TwoFactorStore for SqlxStore<S>
where S: AuthSchema + Send + Sync,

Source§

fn create_two_factor<'life0, 'async_trait>( &'life0 self, two_factor: CreateTwoFactor, ) -> Pin<Box<dyn Future<Output = AuthResult<TwoFactor>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_two_factor_by_user_id<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<TwoFactor>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_two_factor<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateTwoFactor, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<TwoFactor>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn increment_two_factor_failure<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<TwoFactor>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically increment the stored counter, returning the winning row. SQL-backed adapters preserve NULL, matching the pinned Kysely adapter.
Source§

fn set_two_factor_lock_if_count_at_least<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, threshold: f64, until: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<TwoFactor>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn clear_expired_two_factor_lock<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, now: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<TwoFactor>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn reset_two_factor_failures<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn compare_and_swap_two_factor_backup_codes<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: &'life1 str, expected: &'life2 str, replacement: &'life3 str, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn update_two_factor_backup_codes<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, user_id: &'life1 str, backup_codes: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<TwoFactor>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn delete_two_factor<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<S> UserStore<S> for SqlxStore<S>

Source§

fn provider_verification_output<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Value>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read the provider verification column using the adapter’s physical scalar rules. This is retained output, not authorization input; typed models continue to supply the canonical boolean accessor.
Source§

fn create_user<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn create_user_prepared<'life0, 'async_trait>( &'life0 self, prepared: PreparedUserCreation, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Persist a normalized, admitted candidate without normalizing trusted callback mutations again. Unsupported custom adapters fail closed.
Source§

fn coerce_user_text_number<'life0, 'async_trait>( &'life0 self, input: NumericTextInput, ) -> Pin<Box<dyn Future<Output = AuthResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Coerce a numeric binding with the configured adapter’s text semantics. Custom adapters must implement this explicitly when accepting such input.
Source§

fn get_user_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_users_by_ids<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch multiple users by id. Read more
Source§

fn list_users_by_ids_page<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], limit: f64, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Apply the adapter’s raw numeric page to actual matching users. Unsupported stores fail closed rather than rounding, capping, or delegating to an unpaged read.
Source§

fn get_user_by_email<'life0, 'life1, 'async_trait>( &'life0 self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_user_by_username<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_user_by_phone_number<'life0, 'life1, 'async_trait>( &'life0 self, phone_number: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_user<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_user<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_users<'life0, 'async_trait>( &'life0 self, params: ListUsersParams, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<S::User>, usize)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn create_user_record<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, ) -> Pin<Box<dyn Future<Output = Result<AdapterRecord<<S as AuthSchema>::User>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn create_user_with_source_record<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, source: UserValidationSource, ) -> Pin<Box<dyn Future<Output = Result<AdapterRecord<<S as AuthSchema>::User>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn create_user_prepared_record<'life0, 'async_trait>( &'life0 self, prepared: PreparedUserCreation, ) -> Pin<Box<dyn Future<Output = Result<AdapterRecord<<S as AuthSchema>::User>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn get_user_by_id_record<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AdapterRecord<<S as AuthSchema>::User>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn get_user_by_email_record<'life0, 'life1, 'async_trait>( &'life0 self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AdapterRecord<<S as AuthSchema>::User>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn get_user_by_username_record<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AdapterRecord<<S as AuthSchema>::User>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn get_user_by_phone_number_record<'life0, 'life1, 'async_trait>( &'life0 self, phone_number: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AdapterRecord<<S as AuthSchema>::User>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn list_users_by_ids_record<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<Vec<AdapterRecord<<S as AuthSchema>::User>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn list_users_by_ids_page_record<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], limit: f64, ) -> Pin<Box<dyn Future<Output = Result<Vec<AdapterRecord<<S as AuthSchema>::User>>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn update_user_record<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateUser, ) -> Pin<Box<dyn Future<Output = Result<AdapterRecord<<S as AuthSchema>::User>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn list_users_record<'life0, 'async_trait>( &'life0 self, params: ListUsersParams, ) -> Pin<Box<dyn Future<Output = Result<(Vec<AdapterRecord<<S as AuthSchema>::User>>, usize), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.
Source§

fn create_user_with_source<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, _source: UserValidationSource, ) -> Pin<Box<dyn Future<Output = Result<<S as AuthSchema>::User, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Create with endpoint-owned identity provenance, retaining the finalized instance’s validation and database-hook ordering.
Source§

impl<S> VerificationStore<S> for SqlxStore<S>

Source§

fn create_verification_record<'life0, 'async_trait>( &'life0 self, data: VerificationCreation, publication: VerificationPublication, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<VerificationSnapshot>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create through before hooks, optional physical persistence, secondary publication, then after hooks. Unsupported adapters must fail closed.
Source§

fn create_verification<'life0, 'async_trait>( &'life0 self, verification: CreateVerification, ) -> Pin<Box<dyn Future<Output = AuthResult<S::Verification>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_verification<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, identifier: &'life1 str, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_verification_by_value<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_verification_by_identifier<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn consume_verification<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, identifier: &'life1 str, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_latest_verification_by_identifier<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch the newest generation, including expired records. The caller decides whether cleanup and a distinct expiry error are required.
Source§

fn consume_verification_by_identifier<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically invalidate an identifier and return its newest generation. Exactly one concurrent caller can receive a row. Expired records are removed along with every sibling and return None.
Source§

fn consume_verification_snapshot<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically remove the newest generation and all siblings, returning the actual winning snapshot even when expired. This keeps legacy fallback from resurrecting an older logical generation.
Source§

fn delete_verifications_by_identifier<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn compare_and_swap_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: &'life1 str, expected_value: &'life2 str, value: &'life3 str, expires_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Update a generation only when its value still matches the snapshot.
Source§

fn reserve_verification<'life0, 'async_trait>( &'life0 self, verification: CreateVerification, ) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Insert a deterministic reservation exactly once. An expired marker remains reserved until it is cleaned up or explicitly consumed.
Source§

fn reserve_verification_record<'life0, 'life1, 'async_trait>( &'life0 self, logical_identifier: &'life1 str, verification: CreateVerification, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reserve by the original logical identifier while storing its configured transformed identifier. Return the actual newly inserted model only.
Source§

fn update_verification_by_identifier<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, data: UpdateVerification, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<VerificationSnapshot>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update every physical match, with one actual adapter result snapshot.
Source§

fn delete_verification<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete_expired_verifications<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = AuthResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<S> WalletAddressStore for SqlxStore<S>

Source§

fn get_wallet_address<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, chain_id: Option<f64>, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<WalletAddress>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the adapter’s first address match, optionally restricted to a chain. No expiry filter or implicit chain ordering applies.
Source§

fn create_wallet_address<'life0, 'async_trait>( &'life0 self, data: CreateWalletAddress, ) -> Pin<Box<dyn Future<Output = AuthResult<WalletAddress>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validate that the owner exists and insert the wallet under the same transaction/lock. User deletion must remove these owned records under its transaction/lock, including application-owned user schemas.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<S, T> AuthStore<S> for T

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more