Skip to main content

CredentialStore

Trait CredentialStore 

Source
pub trait CredentialStore: Send + Sync {
    // Required methods
    fn set(&self, account: &str, secret: &str) -> Result<(), CredentialError>;
    fn get(&self, account: &str) -> Result<String, CredentialError>;
    fn delete(&self, account: &str) -> Result<(), CredentialError>;

    // Provided method
    fn exists(&self, account: &str) -> bool { ... }
}
Expand description

The seam between Flow code and the OS keyring (or a test double).

Required Methods§

Source

fn set(&self, account: &str, secret: &str) -> Result<(), CredentialError>

Source

fn get(&self, account: &str) -> Result<String, CredentialError>

Source

fn delete(&self, account: &str) -> Result<(), CredentialError>

Provided Methods§

Source

fn exists(&self, account: &str) -> bool

Returns true if a credential exists for this account, without revealing the value. Useful for UI status displays.

Implementors§