pub trait BearerTokenProvider: Send + Sync {
// Required method
fn get_token<'life0, 'async_trait>(
&'life0 self,
args: ProviderTokenArgs,
) -> Pin<Box<dyn Future<Output = Result<String, BearerTokenError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Provider-side callback used to acquire bearer tokens for BYOK providers.
Experimental. This trait is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Required Methods§
Sourcefn get_token<'life0, 'async_trait>(
&'life0 self,
args: ProviderTokenArgs,
) -> Pin<Box<dyn Future<Output = Result<String, BearerTokenError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_token<'life0, 'async_trait>(
&'life0 self,
args: ProviderTokenArgs,
) -> Pin<Box<dyn Future<Output = Result<String, BearerTokenError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Acquire a bearer token without the Bearer prefix.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".