pub struct AuthStore {
pub credentials: Vec<ProviderCredentials>,
}Expand description
Credentials storage for auth providers
Fields§
§credentials: Vec<ProviderCredentials>Implementations§
Source§impl AuthStore
impl AuthStore
Sourcepub fn save(&self) -> Result<()>
pub fn save(&self) -> Result<()>
Save auth store to disk securely Uses atomic write: temp file → set permissions → rename
Sourcepub fn add(&mut self, provider: &str, api_key: &str, base_url: Option<&str>)
pub fn add(&mut self, provider: &str, api_key: &str, base_url: Option<&str>)
Add credentials for a provider
Sourcepub fn list(&self) -> Vec<(String, String, Option<String>)>
pub fn list(&self) -> Vec<(String, String, Option<String>)>
List all credentials (with API keys masked)
Sourcepub fn get(&self, provider: &str) -> Option<&ProviderCredentials>
pub fn get(&self, provider: &str) -> Option<&ProviderCredentials>
Get credentials for a provider
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AuthStore
impl<'de> Deserialize<'de> for AuthStore
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuthStore
impl RefUnwindSafe for AuthStore
impl Send for AuthStore
impl Sync for AuthStore
impl Unpin for AuthStore
impl UnsafeUnpin for AuthStore
impl UnwindSafe for AuthStore
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
Mutably borrows from an owned value. Read more