Skip to main content

AuthTransaction

Trait AuthTransaction 

Source
pub trait AuthTransaction<S: AuthSchema>: Send + Sync {
Show 29 methods // Required methods 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; 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; 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; // Provided methods 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 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_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 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 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 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 { ... } fn create_user_record<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn create_user_with_source_record<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, source: UserValidationSource, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn create_user_prepared_record<'life0, 'async_trait>( &'life0 self, prepared: PreparedUserCreation, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_user_by_id_record<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn create_account_record<'life0, 'async_trait>( &'life0 self, create_account: CreateAccount, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::Account>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn create_session_record<'life0, 'async_trait>( &'life0 self, create_session: CreateSession, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::Session>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn update_session_active_organization_record<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, token: &'life1 str, organization_id: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::Session>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn update_session_active_team_record<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, token: &'life1 str, team_id: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::Session>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } 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 get_team<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _organization_id: &'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 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 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 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 { ... } 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 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 { ... } fn create_passkey<'life0, 'async_trait>( &'life0 self, _passkey: CreatePasskey, ) -> Pin<Box<dyn Future<Output = AuthResult<Passkey>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn create_user_with_source<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, _source: UserValidationSource, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } 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_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 { ... }
}

Required Methods§

Source

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

Source

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

Provided Methods§

Source

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

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

Source

fn 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 session using the actual transaction-local model and creation hooks.

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,

Stage an update against a trusted cached model using this transaction’s hooks.

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,

Persist a staged update on the current connection; after hooks belong to commit.

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,

Read the managed signing keyring on this transaction’s connection.

Source

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

Find a managed signing key on this transaction’s connection.

Source

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

Persist a newly generated managed signing key in this transaction.

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

fn get_team<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _organization_id: &'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,

Read a team within the authorized organization through this transaction.

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,

Add an idempotent team membership under the same transaction’s capacity check.

Source

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

Source

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

Update the already authenticated token through the transaction connection.

Source

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

Source

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

Read an existing registration owner through this transaction’s connection.

Source

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

Persist a verified passkey in the same transaction as its new session.

Source

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

Create with endpoint-owned identity provenance. The finalized instance applies its policy before adapter hooks. Raw adapters retain ordinary creation.

Source

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

Persist an admitted candidate without a second email normalization. Custom adapters serving validation-enabled instances must implement this.

Source

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§