Skip to main content

TokenFetcher

Trait TokenFetcher 

Source
pub trait TokenFetcher {
    // Required method
    async fn fetch_token(&self, provider: &str) -> Result<BrokerToken, String>;
}
Expand description

“Get a fresh access token from somewhere.” Abstracted so the cache/resolve logic is unit-testable without real HTTP. The real impl is BrokerClient.

Required Methods§

Source

async fn fetch_token(&self, provider: &str) -> Result<BrokerToken, String>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§