Trait rusty_box::auth::Auth

source ·
pub trait Auth<'a> {
    // Required methods
    fn access_token<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<String, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn to_json<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<String, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn base_api_url(&self) -> String;
    fn user_agent(&self) -> String;
}
Expand description

Trait for authentication methods

Required Methods§

source

fn access_token<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<String, AuthError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn to_json<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<String, AuthError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn base_api_url(&self) -> String

source

fn user_agent(&self) -> String

Implementations§

source§

impl dyn Auth<'_>

source

pub async fn auth_header(&mut self) -> Result<Headers, AuthError>

Trait Implementations§

source§

impl Debug for dyn Auth<'_>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§

source§

impl<'a> Auth<'a> for CCGAuth

source§

impl<'a> Auth<'a> for DevAuth