Skip to main content

AccessTokenCredentialsProvider

Trait AccessTokenCredentialsProvider 

Source
pub trait AccessTokenCredentialsProvider: CredentialsProvider + Debug {
    // Required method
    fn access_token(
        &self,
    ) -> impl Future<Output = Result<AccessToken, CredentialsError>> + Send;
}
Expand description

A trait for credential types that can provide direct access to an access token.

This trait is primarily intended for interoperability with other libraries that require a raw access token, or for calling Google Cloud APIs that are not yet supported by the SDK.

Required Methods§

Source

fn access_token( &self, ) -> impl Future<Output = Result<AccessToken, CredentialsError>> + Send

Asynchronously retrieves an access token.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§