Struct ocipkg::distribution::StoredAuth
source · pub struct StoredAuth { /* private fields */ }
Expand description
Authentication info stored in filesystem
Implementations§
source§impl StoredAuth
impl StoredAuth
pub fn insert(&mut self, domain: &str, octet: String)
pub fn save(&self) -> Result<()>
sourcepub fn get_token(&self, url: &Url) -> Result<Option<String>>
pub fn get_token(&self, url: &Url) -> Result<Option<String>>
Get token by trying to access API root /v2/
Returns None
if no authentication is required.
sourcepub fn challenge(&self, challenge: &AuthChallenge) -> Result<String>
pub fn challenge(&self, challenge: &AuthChallenge) -> Result<String>
Get token based on WWW-Authentication header
pub fn append(&mut self, other: Self) -> Result<()>
Trait Implementations§
source§impl Clone for StoredAuth
impl Clone for StoredAuth
source§fn clone(&self) -> StoredAuth
fn clone(&self) -> StoredAuth
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StoredAuth
impl Debug for StoredAuth
source§impl Default for StoredAuth
impl Default for StoredAuth
source§fn default() -> StoredAuth
fn default() -> StoredAuth
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for StoredAuth
impl<'de> Deserialize<'de> for StoredAuth
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 StoredAuth
impl RefUnwindSafe for StoredAuth
impl Send for StoredAuth
impl Sync for StoredAuth
impl Unpin for StoredAuth
impl UnwindSafe for StoredAuth
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