pub enum KeyringProvider {
SecretTool,
KwalletQuery,
Security,
Pass,
}wizard only.Expand description
A well-known credential-provider CLI a password can be read from.
Variants§
SecretTool
secret-tool, over the Secret Service (GNOME Keyring).
KwalletQuery
kwallet-query, over the KDE Wallet.
Security
security, over the macOS Keychain.
Pass
pass, the standard unix password manager.
Implementations§
Source§impl KeyringProvider
impl KeyringProvider
Sourcepub fn available() -> Vec<Self>
pub fn available() -> Vec<Self>
The providers relevant on the running OS, most native first. Empty on platforms without a known stdin-friendly provider (Windows), where the picker goes straight to a custom command.
Sourcepub fn read_command(self, service: Option<&str>, key: &str) -> Vec<String>
pub fn read_command(self, service: Option<&str>, key: &str) -> Vec<String>
The argv (program + arguments, no shell) printing the secret at
key on stdout — the value of the *.command config field.
key is used verbatim as the entry identifier: service is
an optional namespace a self-owning broker (which stores and
reads its own value, e.g. an OAuth token manager) adds — a path
prefix for pass/kwallet, a distinct attribute for
secret-tool/security. Pass None to read a pre-existing entry
exactly as named.
Sourcepub fn write_command(self, service: Option<&str>, key: &str) -> String
pub fn write_command(self, service: Option<&str>, key: &str) -> String
The shell command line persisting a secret it receives on stdin
— the write half of a store/read pair for a broker that owns the
value (e.g. an OAuth token manager), as opposed to a pre-existing
entry the user stores themselves. A shell line rather than an
argv: the writes rely on shell features ($(cat) on macOS).
Trait Implementations§
Source§impl Clone for KeyringProvider
impl Clone for KeyringProvider
Source§fn clone(&self) -> KeyringProvider
fn clone(&self) -> KeyringProvider
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more