pub trait AuthProvider: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn display_name(&self) -> &str;
fn credential_files(&self) -> Vec<CredentialFile>;
// Provided method
fn validate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ValidationResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Trait for auth credential providers.
Implement this trait to add support for syncing credentials of any dev tool. Each provider declares its name, the credential files it manages, and optionally a validation method to check credential freshness.
Required Methods§
Sourcefn display_name(&self) -> &str
fn display_name(&self) -> &str
Human-readable display name.
Sourcefn credential_files(&self) -> Vec<CredentialFile>
fn credential_files(&self) -> Vec<CredentialFile>
List of credential files/directories this provider manages.
Provided Methods§
Sourcefn validate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ValidationResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ValidationResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Validate whether the current local credentials are still valid.
Defaults to ValidationResult::Unknown.