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§
Sourcefn access_token(&self) -> AccessToken
fn access_token(&self) -> AccessToken
Should return a valid oauth2::AccessToken().
Implementors§
impl AccessTokenProvider for OAuthCbClient
Returning the access token stored by the OAuthCbClient.
Note that the token might be expired and invalid.