pub trait GetToken: GetTokenClone + Send + Sync {
    fn get_token<'a>(
        &'a self,
        _scopes: &'a [&str]
    ) -> Pin<Box<dyn Future<Output = Result<Option<String>, Box<dyn Error + Send + Sync>>> + Send + 'a>>; }

Required Methods§

Called whenever an API call requires authentication via an oauth2 token. Returns Ok(None) if a token is not necessary - otherwise, returns an error indicating the reason why a token could not be produced.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Implementations on Foreign Types§

Implementors§