pub trait TokenGenerator: 'static + Send + Sync {
    // Required method
    fn generate_token<'life0, 'life1, 'async_trait>(
        &'life0 self,
        req: &'life1 Request
    ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

This trait is used to generate token

Required Methods§

source

fn generate_token<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 Request ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Generate a new token

Implementations on Foreign Types§

source§

impl TokenGenerator for Box<dyn ApiAuthenticator>

source§

fn generate_token<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 Request ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§