Trait SimpleAuthorization

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§