Skip to main content

GenerateOneTimeToken

Trait GenerateOneTimeToken 

Source
pub trait GenerateOneTimeToken: Send + Sync {
    // Required method
    fn generate<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session: &'life1 OneTimeTokenSession,
        request: Option<&'life2 AuthRequest>,
    ) -> Pin<Box<dyn Future<Output = AuthResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Application-owned token generation, including asynchronous generators.

Return AuthError::Api or AuthError::Upstream for an explicit public veto. Other callback errors produce an empty HTTP 500 without exposing the cause.

Required Methods§

Source

fn generate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session: &'life1 OneTimeTokenSession, request: Option<&'life2 AuthRequest>, ) -> Pin<Box<dyn Future<Output = AuthResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§