pub trait KeyStore: Send + Sync {
// Required methods
fn store_key(&self, user_id: &str, key: &str) -> Result<()>;
fn get_key(&self, user_id: &str) -> Result<Option<Zeroizing<String>>>;
fn delete_key(&self, user_id: &str) -> Result<()>;
fn is_available(&self) -> bool;
}Expand description
Trait for secure credential storage (system keyring, encrypted file, etc).
CLI implements this with the keyring crate (GNOME Keyring, macOS Keychain,
Windows Credential Manager).
Required Methods§
Sourcefn get_key(&self, user_id: &str) -> Result<Option<Zeroizing<String>>>
fn get_key(&self, user_id: &str) -> Result<Option<Zeroizing<String>>>
Retrieve a key for a given user ID (returns Zeroizing for secure memory clearing)
Sourcefn delete_key(&self, user_id: &str) -> Result<()>
fn delete_key(&self, user_id: &str) -> Result<()>
Delete the key for a given user ID
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if the key store backend is available on this system