AccessTokenProvider

Trait AccessTokenProvider 

Source
pub trait AccessTokenProvider {
    // Required method
    fn access_token(&self) -> AccessToken;
}
Expand description

Trait to implement for any class proviging authentication functionalities to the client.

For instance:

let cb_client = client::CbClient::new(&client_with_access_token_provider_trait);

the oauth_cb_client should implement this trait.

Required Methods§

Source

fn access_token(&self) -> AccessToken

Should return a valid oauth2::AccessToken().

Implementors§

Source§

impl AccessTokenProvider for OAuthCbClient

Returning the access token stored by the OAuthCbClient.

Note that the token might be expired and invalid.