pub enum AuthCredentialsStoreMode {
Keyring,
File,
Auto,
}Expand description
Preferred storage backend for credentials.
Keyring: Use OS-specific secure storage (macOS Keychain, Windows Credential Manager, Linux Secret Service). This is the default as it’s the most secure option.File: Use an AES-256-GCM encrypted file whose key is stored in the OS keyring.Auto: Try keyring first, then file storage; both require an accessible OS keyring key, so storage fails closed when the keyring is unavailable.
Variants§
Keyring
Use OS-specific keyring service. This is the most secure option as credentials are managed by the OS and are not accessible to other users or applications.
File
Persist credentials in an encrypted file. The AES-256-GCM key is stored separately in the OS keyring.
Auto
Try keyring first, then encrypted-file storage using a key held by the OS keyring.
Trait Implementations§
Source§impl Clone for AuthCredentialsStoreMode
impl Clone for AuthCredentialsStoreMode
impl Copy for AuthCredentialsStoreMode
Source§impl Debug for AuthCredentialsStoreMode
impl Debug for AuthCredentialsStoreMode
Source§impl Default for AuthCredentialsStoreMode
impl Default for AuthCredentialsStoreMode
Source§fn default() -> Self
fn default() -> Self
Platform-aware default:
-
macOS:
File— AES-256-GCM encrypted file with its key held in Keychain. Users can opt into storing credentials directly in Keychain viacredential_storage_modeinvtcode.toml. -
Linux / Windows / others:
Auto— try OS keyring (Secret Service / Windows Credential Manager), then an encrypted file. Both modes require an accessible OS keyring key and fail closed when unavailable.
Source§impl<'de> Deserialize<'de> for AuthCredentialsStoreMode
impl<'de> Deserialize<'de> for AuthCredentialsStoreMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AuthCredentialsStoreMode
Source§impl PartialEq for AuthCredentialsStoreMode
impl PartialEq for AuthCredentialsStoreMode
Source§impl Serialize for AuthCredentialsStoreMode
impl Serialize for AuthCredentialsStoreMode
impl StructuralPartialEq for AuthCredentialsStoreMode
Auto Trait Implementations§
impl Forget for AuthCredentialsStoreMode
impl Freeze for AuthCredentialsStoreMode
impl Move for AuthCredentialsStoreMode
impl RefUnwindSafe for AuthCredentialsStoreMode
impl Send for AuthCredentialsStoreMode
impl Sync for AuthCredentialsStoreMode
impl Unpin for AuthCredentialsStoreMode
impl UnsafeUnpin for AuthCredentialsStoreMode
impl UnwindSafe for AuthCredentialsStoreMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.