pub trait TokenProvider: Send + Sync {
// Required method
fn get_token(
&self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + '_>>;
}Expand description
Trait for token providers that supply bearer tokens for API requests.
Implementations should handle caching and refresh automatically.