pub struct SqlxStore<S: AuthSchema> { /* private fields */ }Implementations§
Source§impl<S: AuthSchema> SqlxStore<S>
impl<S: AuthSchema> SqlxStore<S>
pub fn new( config: impl Into<Arc<AuthConfig>>, pool: impl Into<SqlxPool>, ) -> Self
Sourcepub fn with_organization_models(self, models: OrganizationModels) -> Self
pub fn with_organization_models(self, models: OrganizationModels) -> Self
Bind the organization plugin to application-owned tables.
pub fn with_hooks( self, hooks: Vec<Arc<dyn DatabaseHooks<S, SqlxBackend>>>, ) -> Self
pub fn hook<H: DatabaseHooks<S, SqlxBackend> + 'static>(self, hook: H) -> Self
pub const fn pool(&self) -> &SqlxPool
pub const fn config(&self) -> &Arc<AuthConfig> ⓘ
Trait Implementations§
Source§impl<S> AccountStore<S> for SqlxStore<S>
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,
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.
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,
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,
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.
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,
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,
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,
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,
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.
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,
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>
impl<S> ApiKeyStore for SqlxStore<S>
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,
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.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,
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,
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,
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,
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,
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
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,
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: AuthSchema> Debug for SqlxStore<S>
impl<S: AuthSchema> Debug for SqlxStore<S>
Source§impl<S> DeviceCodeStore for SqlxStore<S>
impl<S> DeviceCodeStore for SqlxStore<S>
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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>
impl<S> InvitationStore for SqlxStore<S>
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,
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,
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,
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,
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,
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,
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,
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.
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,
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,
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,
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.
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>
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,
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.
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,
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>
impl<S> MemberStore for SqlxStore<S>
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,
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,
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,
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,
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.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,
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,
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,
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,
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,
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.
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,
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>
impl<S: AuthSchema> OAuthClientStore for SqlxStore<S>
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,
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.
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,
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,
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,
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,
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.
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
fn create_oauth_consent<'life0, 'async_trait>(
&'life0 self,
data: CreateOAuthConsent,
) -> Pin<Box<dyn Future<Output = AuthResult<OAuthConsent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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,
fn update_oauth_consent_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
metadata: Value,
updated_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<OAuthConsent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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,
fn get_oauth_consent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<OAuthConsent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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,
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,
fn delete_oauth_consent<'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,
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,
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,
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>
impl<S: AuthSchema> OrganizationRoleStore for SqlxStore<S>
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,
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,
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,
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,
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.
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,
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>
impl<S> OrganizationStore for SqlxStore<S>
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,
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,
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,
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
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,
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,
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,
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.
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>
impl<S: AuthSchema + Send + Sync> PasskeyStore for SqlxStore<S>
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,
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,
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,
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,
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.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,
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.
impl<S: AuthSchema> SchemaMigrator for SqlxStore<S>
Installs the bundled auth schema in better_auth_migrations, the ledger
the SeaORM adapter also records.
Source§impl<S> SessionStore<S> for SqlxStore<S>
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,
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,
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,
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,
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,
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,
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.
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,
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,
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.
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,
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.
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,
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,
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.
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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>
impl<S: AuthSchema> SsoProviderStore for SqlxStore<S>
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,
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,
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,
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>
impl<S> TeamStore for SqlxStore<S>
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,
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,
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,
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,
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.
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,
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.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,
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,
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>where
S: AuthSchema,
S::User: SqlxUserModel,
S::Account: SqlxAccountModel,
S::Session: SqlxSessionModel,
S::Verification: SqlxVerificationModel,
impl<S> TransactionStore<S> for SqlxStore<S>where
S: AuthSchema,
S::User: SqlxUserModel,
S::Account: SqlxAccountModel,
S::Session: SqlxSessionModel,
S::Verification: SqlxVerificationModel,
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§impl<S> TwoFactorStore for SqlxStore<S>
impl<S> TwoFactorStore for SqlxStore<S>
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,
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,
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,
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.
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,
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,
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,
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,
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,
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>
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,
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.
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,
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,
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.
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,
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,
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.
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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>
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,
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.
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,
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,
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,
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,
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,
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,
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,
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.
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,
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,
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,
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,
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.
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,
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>
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,
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,
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§
impl<S> !RefUnwindSafe for SqlxStore<S>
impl<S> !UnwindSafe for SqlxStore<S>
impl<S> Freeze for SqlxStore<S>
impl<S> Send for SqlxStore<S>
impl<S> Sync for SqlxStore<S>
impl<S> Unpin for SqlxStore<S>
impl<S> UnsafeUnpin for SqlxStore<S>
Blanket Implementations§
impl<S, T> AuthStore<S> for Twhere
S: AuthSchema,
T: UserStore<S> + SessionStore<S> + AccountStore<S> + VerificationStore<S> + OrganizationStore + MemberStore + InvitationStore + OAuthClientStore + SsoProviderStore + TeamStore + OrganizationRoleStore + WalletAddressStore + TwoFactorStore + ApiKeyStore + PasskeyStore + DeviceCodeStore + JwkStore + TransactionStore<S> + Send + Sync,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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