[−][src]Struct kerbeiros::credentials::CredentialWarehouse
Example
Load from ccache file:
use kerbeiros::credentials::CredentialWarehouse; use kerberos_ccache::CCache; use std::convert::TryFrom; use std::fs; let file_data = fs::read("./bob_tgt.ccache").expect("Unable to read file"); let ccache = CCache::parse(&file_data).expect("Unable to parse file content").1; let credentials = CredentialWarehouse::try_from(ccache).expect("Unable to parse CCache");
To store several credentials related to the same user and realm
Methods
impl CredentialWarehouse
[src]
pub fn credentials(&self) -> &Vec<Credential>
[src]
pub fn realm(&self) -> &Realm
[src]
pub fn client(&self) -> &PrincipalName
[src]
impl CredentialWarehouse
[src]
pub fn new(
realm: Realm,
client: PrincipalName,
credentials: Vec<Credential>
) -> Self
[src]
realm: Realm,
client: PrincipalName,
credentials: Vec<Credential>
) -> Self
pub fn save_into_ccache_file(&self, path: &str) -> Result<()>
[src]
Saves the credentials into a file by using the ccache format, used by Linux.
pub fn save_into_krb_cred_file(&self, path: &str) -> Result<()>
[src]
Saves the credentials into a file by using the KRB-CRED format, used by Windows.
Trait Implementations
impl Clone for CredentialWarehouse
[src]
fn clone(&self) -> CredentialWarehouse
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CredentialWarehouse
[src]
impl From<Credential> for CredentialWarehouse
[src]
fn from(credential: Credential) -> Self
[src]
impl Into<CCache> for CredentialWarehouse
[src]
impl PartialEq<CredentialWarehouse> for CredentialWarehouse
[src]
fn eq(&self, other: &CredentialWarehouse) -> bool
[src]
fn ne(&self, other: &CredentialWarehouse) -> bool
[src]
impl StructuralPartialEq for CredentialWarehouse
[src]
impl TryFrom<CCache> for CredentialWarehouse
[src]
Auto Trait Implementations
impl RefUnwindSafe for CredentialWarehouse
impl Send for CredentialWarehouse
impl Sync for CredentialWarehouse
impl Unpin for CredentialWarehouse
impl UnwindSafe for CredentialWarehouse
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,