Struct cerbero_lib::TicketCreds
source · pub struct TicketCreds {
pub ticket_creds: Vec<TicketCred>,
}Expand description
Struct to store a vector of TicketCred with additional functionality
Fields§
§ticket_creds: Vec<TicketCred>Implementations§
source§impl TicketCreds
impl TicketCreds
pub fn new(ticket_creds: Vec<TicketCred>) -> Self
pub fn empty() -> Self
pub fn as_bytes(&self) -> Vec<u8> ⓘ
pub fn from_bytes(vec: Vec<u8>) -> Result<Self>
pub fn push(&mut self, ticket_info: TicketCred)
pub fn iter(&self) -> Iter<'_, TicketCred>
pub fn is_empty(&self) -> bool
pub fn get(&self, index: usize) -> Option<&TicketCred>
pub fn filter<P>(&self, predicate: P) -> Self
sourcepub fn prealm(&self, realm: &str) -> Self
pub fn prealm(&self, realm: &str) -> Self
Filter tickets for prealm (realm of the client). Case insensitive.
sourcepub fn pname(&self, name: &PrincipalName) -> Self
pub fn pname(&self, name: &PrincipalName) -> Self
Filter tickets for pname (the name of the client). Case insensitive.
sourcepub fn srealm(&self, realm: &str) -> Self
pub fn srealm(&self, realm: &str) -> Self
Filter tickets for srealm (realm of the service). Case insensitive.
sourcepub fn sname(&self, name: &PrincipalName) -> Self
pub fn sname(&self, name: &PrincipalName) -> Self
Filter tickets for sname (the name of the service). Case insensitive.
sourcepub fn user_realm(&self, realm: &str) -> Self
pub fn user_realm(&self, realm: &str) -> Self
Filter tickets for user_realm. Same as prealm. Case insensitive.
sourcepub fn service_name(&self, name: &str) -> Self
pub fn service_name(&self, name: &str) -> Self
Filter to only return tickets that includes a given name in service. It could be the name of the service (e.g: http, cifs), the hostname or any other string that appears in the service name. Case insensitive.
sourcepub fn user_tgt_realm(&self, user: &KrbUser, realm: &str) -> Self
pub fn user_tgt_realm(&self, user: &KrbUser, realm: &str) -> Self
Filter to only returns TGTs for a given realm.
sourcepub fn user_service(
&self,
client: &KrbUser,
sname: &PrincipalName,
srealm: &str,
) -> Self
pub fn user_service( &self, client: &KrbUser, sname: &PrincipalName, srealm: &str, ) -> Self
Filter to return tickets for an user to an specific service
Trait Implementations§
source§impl Clone for TicketCreds
impl Clone for TicketCreds
source§fn clone(&self) -> TicketCreds
fn clone(&self) -> TicketCreds
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for TicketCreds
impl Debug for TicketCreds
source§impl From<(Vec<Ticket>, Vec<KrbCredInfo>)> for TicketCreds
impl From<(Vec<Ticket>, Vec<KrbCredInfo>)> for TicketCreds
source§impl From<TicketCred> for TicketCreds
impl From<TicketCred> for TicketCreds
source§fn from(ticket_info: TicketCred) -> Self
fn from(ticket_info: TicketCred) -> Self
source§impl From<TicketCreds> for KrbCred
impl From<TicketCreds> for KrbCred
source§fn from(ticket_creds: TicketCreds) -> KrbCred
fn from(ticket_creds: TicketCreds) -> KrbCred
source§impl From<Vec<TicketCred>> for TicketCreds
impl From<Vec<TicketCred>> for TicketCreds
source§fn from(v: Vec<TicketCred>) -> Self
fn from(v: Vec<TicketCred>) -> Self
source§impl TryFrom<KrbCred> for TicketCreds
impl TryFrom<KrbCred> for TicketCreds
Convert from Kerberos credentials in plain text, the usual way of storing them in machines. In case the credentials are encrypted this will fail.