pub trait SecondaryAuth: Send + Sync {
// Required method
fn apply_to_client<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
client: &'life1 APIClient,
primary: &'life2 SessionIdentity,
) -> Pin<Box<dyn Future<Output = Result<(), TestAuthError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Secondary (multi-factor) authentication layer.
Open trait — implement this for custom secondary auth methods (e.g., PassKey, FIDO2) that compose with a primary auth method.
Required Methods§
Sourcefn apply_to_client<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
client: &'life1 APIClient,
primary: &'life2 SessionIdentity,
) -> Pin<Box<dyn Future<Output = Result<(), TestAuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn apply_to_client<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
client: &'life1 APIClient,
primary: &'life2 SessionIdentity,
) -> Pin<Box<dyn Future<Output = Result<(), TestAuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Apply this secondary auth layer to an HTTP test client.
Typically sets additional headers or cookies on the client.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".