pub trait TokenSource:
Send
+ Sync
+ Debug {
// Required method
fn fetch_bearer(
&self,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + '_>>;
}Expand description
A source of bearer tokens for request authentication.
Implemented by canton_auth::TokenProvider (OIDC client-credentials with
caching + refresh). Object-safe by design: Auth::Dynamic stores it as an
Arc<dyn TokenSource>.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".