TokenType

Trait TokenType 

Source
pub trait TokenType: Send + Sync {
    // Required methods
    fn token<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn app_config(&self) -> AppConfig;
}
Expand description

定义接口调用凭据的行为

Required Methods§

Source

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

获取接口调用凭据

Source

fn app_config(&self) -> AppConfig

获取应用配置

Implementors§

Source§

impl TokenType for NonStableToken

普通接口调用凭据获取实现

Source§

impl TokenType for StableToken

稳定版接口调用凭据获取实现