pub trait TokenCredential:
Send
+ Sync
+ Debug {
// Required method
fn get_token<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scopes: &'life1 [&'life2 str],
options: Option<TokenRequestOptions<'life3>>,
) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Represents a credential capable of providing an OAuth token.
Required Methods§
Sourcefn get_token<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scopes: &'life1 [&'life2 str],
options: Option<TokenRequestOptions<'life3>>,
) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_token<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scopes: &'life1 [&'life2 str],
options: Option<TokenRequestOptions<'life3>>,
) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets an AccessToken for the specified scopes