Skip to main content

CredentialResolver

Trait CredentialResolver 

Source
pub trait CredentialResolver: Send + Sync {
    // Required method
    fn resolve_cloud_ai_key(
        &self,
        provider: &str,
        env_var: &str,
    ) -> Result<String, CredentialError>;
}
Expand description

Resolves a credential by trying the configured store first, then falling back to an environment variable. This preserves the v1 cloud-AI experience (env-var-only keys) while letting users migrate to the keyring at their own pace.

Required Methods§

Source

fn resolve_cloud_ai_key( &self, provider: &str, env_var: &str, ) -> Result<String, CredentialError>

Resolve the API key for a cloud-AI provider, given the canonical provider name and the env-var name to fall back to.

Implementors§