Skip to main content

TokenProvider

Trait TokenProvider 

Source
pub trait TokenProvider:
    Send
    + Sync
    + 'static {
    type Error: StdError + Send + Sync + 'static;

    // Required method
    fn get_token(
        &self,
    ) -> impl Future<Output = Result<impl Token, Self::Error>> + Send;
}
Expand description

Provides authentication tokens for S3-compatible requests.

Required Associated Types§

Source

type Error: StdError + Send + Sync + 'static

Error returned when a token cannot be provided.

Required Methods§

Source

fn get_token( &self, ) -> impl Future<Output = Result<impl Token, Self::Error>> + Send

Returns a fresh token, fetching or refreshing it as needed.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl TokenProvider for !

Unauthenticated backends have no token provider, so ! stands in for one.

Source§

type Error = !

Source§

async fn get_token(&self) -> Result<!, !>

Implementors§