pub trait CredentialProvider: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn resolve<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn refresh<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn supports_refresh(&self) -> bool { ... }
}Expand description
Trait for resolving credentials from various sources.
Required Methods§
Provided Methods§
Sourcefn refresh<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn refresh<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Refresh expired credentials.
Sourcefn supports_refresh(&self) -> bool
fn supports_refresh(&self) -> bool
Whether this provider supports credential refresh.
Implementors§
impl CredentialProvider for ChainProvider
impl CredentialProvider for ClaudeCliProvider
Available on crate feature
cli-integration only.