Skip to main content

StatelessStore

Struct StatelessStore 

Source
pub struct StatelessStore { /* private fields */ }
Expand description

Instance-local provisioning without durable persistence. Session ownership comes from trusted issuance; the initialized wrapper retains ephemeral sessions.

Implementations§

Source§

impl StatelessStore

Source

pub fn with_find_many_limit(find_many_limit: usize) -> Self

Use the configured adapter page bound for native organization rows.

Trait Implementations§

Source§

impl AccountStore<StatelessSchema> for StatelessStore

Source§

fn create_account<'life0, 'async_trait>( &'life0 self, create_account: CreateAccount, ) -> Pin<Box<dyn Future<Output = AuthResult<AccountView>> + 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<AccountView>>> + 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<AccountView>>> + 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<AccountView>> + 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 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_record<'life0, 'async_trait>( &'life0 self, create_account: CreateAccount, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::Account>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 = AuthResult<Option<AdapterRecord<S::Account>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 = AuthResult<Option<AdapterRecord<S::Account>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Vec<AdapterRecord<S::Account>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn update_account_record<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateAccount, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::Account>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 ApiKeyStore for StatelessStore

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 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§

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 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§

impl Default for StatelessStore

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl DeviceCodeStore for StatelessStore

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 InvitationStore for StatelessStore

Source§

fn create_invitation<'life0, 'async_trait>( &'life0 self, data: 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, data: 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 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 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 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 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 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 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§

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§

impl JwkStore for StatelessStore

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 MemberStore for StatelessStore

Source§

fn create_member<'life0, 'async_trait>( &'life0 self, data: 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, 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, 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, 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_member_with_context<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, 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 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 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, query: &'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 OrganizationRoleStore for StatelessStore

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, org: &'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, org: &'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, org: &'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, org: &'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, org: &'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, org: &'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 OrganizationStore for StatelessStore

Source§

fn create_organization<'life0, 'async_trait>( &'life0 self, data: 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 PasskeyStore for StatelessStore

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 SessionStore<StatelessSchema> for StatelessStore

Source§

fn prepare_secondary_session_creation<'life0, 'async_trait>( &'life0 self, input: CreateSession, persist: bool, ) -> Pin<Box<dyn Future<Output = AuthResult<SessionView>> + 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 SessionView, ) -> 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 create_session<'life0, 'async_trait>( &'life0 self, input: CreateSession, ) -> Pin<Box<dyn Future<Output = AuthResult<SessionView>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn prepare_secondary_session_update<'life0, 'async_trait>( &'life0 self, session: SessionView, expires_at: Option<DateTime<Utc>>, fields: FieldValues, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<(SessionView, 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: SessionView, _expires_at: Option<DateTime<Utc>>, _fields: FieldValues, persist: bool, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<SessionView>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

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

Source§

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

Source§

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

Source§

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

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: &'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 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 get_session_user<'life0, 'life1, 'async_trait>( &'life0 self, _token: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<AdapterRecord<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 = AuthResult<Option<AdapterRecord<S::Session>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Vec<AdapterRecord<S::Session>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Vec<AdapterRecord<S::Session>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Vec<AdapterRecord<S::Session>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Option<AdapterRecord<S::Session>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Option<AdapterRecord<S::Session>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<AdapterRecord<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 = AuthResult<AdapterRecord<S::Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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<'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 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 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 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 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§

impl TeamStore for StatelessStore

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>, 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, 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, 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 TransactionStore<StatelessSchema> for StatelessStore

Source§

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

Source§

impl TwoFactorStore for StatelessStore

Source§

fn create_two_factor<'life0, 'async_trait>( &'life0 self, input: 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 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§

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§

impl UserStore<StatelessSchema> for StatelessStore

Source§

fn create_user<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<UserView>> + 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<UserView>> + 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 get_user_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<UserView>>> + 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<UserView>>> + 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<UserView>>> + 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<UserView>>> + 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<UserView>>> + 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<UserView>>> + 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<UserView>> + 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<UserView>, usize)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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_record<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Vec<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Vec<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<(Vec<AdapterRecord<S::User>>, usize)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 = AuthResult<S::User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create with endpoint-owned identity provenance, retaining the finalized instance’s validation and database-hook ordering.
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§

impl VerificationStore<StatelessSchema> for StatelessStore

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 consume_verification_snapshot<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<VerificationView>>> + 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 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 reserve_verification_record<'life0, 'life1, 'async_trait>( &'life0 self, logical_identifier: &'life1 str, data: CreateVerification, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<VerificationView>>> + 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 create_verification<'life0, 'async_trait>( &'life0 self, verification: CreateVerification, ) -> Pin<Box<dyn Future<Output = AuthResult<VerificationView>> + 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<VerificationView>>> + 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<VerificationView>>> + 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<VerificationView>>> + 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<VerificationView>>> + 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<VerificationView>>> + 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<VerificationView>>> + 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 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 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 WalletAddressStore for StatelessStore

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

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> 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, 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