pub trait SimpleAuthorization<'r>where
    Self: Sized,{
    // Required method
    fn authorizing<'life0, 'async_trait>(
        request: &'r Request<'life0>,
        authorization: Option<&'r str>
    ) -> Pin<Box<dyn Future<Output = Option<Self>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'r: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The trait for an authorizer.

Required Methods§

source

fn authorizing<'life0, 'async_trait>( request: &'r Request<'life0>, authorization: Option<&'r str> ) -> Pin<Box<dyn Future<Output = Option<Self>> + Send + 'async_trait>>where Self: 'async_trait, 'r: 'async_trait, 'life0: 'async_trait,

Check whether the value in the Authorization header is valid or not. If it is valid, create a new instance of Self.

Object Safety§

This trait is not object safe.

Implementors§