pub struct DelegationClaims {
pub token_id: String,
pub ai_member: String,
pub delegated_by: String,
pub project_id: String,
pub created: DateTime<Utc>,
pub expires: Option<DateTime<Utc>>,
pub scopes: Vec<String>,
}Expand description
Claims encoded in a delegation token.
Fields§
§token_id: StringUnique identifier for this specific token (UUID v4). Used to detect
replay: once a token has been redeemed, subsequent redemption
attempts for the same token_id are rejected (ADR-033).
ai_member: String§delegated_by: String§project_id: String§created: DateTime<Utc>§expires: Option<DateTime<Utc>>§scopes: Vec<String>Capability scopes for this token. Default ["auth"]. Tokens issued
with --crypt also carry "crypt" (ADR-041 §3). Unknown scopes are
preserved so newer scope vocabularies do not break older verifiers.
Implementations§
Source§impl DelegationClaims
impl DelegationClaims
Sourcepub fn has_crypt_scope(&self) -> bool
pub fn has_crypt_scope(&self) -> bool
Whether the token authorises Crypt unwrap (carries delegation privkey).
Trait Implementations§
Source§impl Clone for DelegationClaims
impl Clone for DelegationClaims
Source§fn clone(&self) -> DelegationClaims
fn clone(&self) -> DelegationClaims
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DelegationClaims
impl Debug for DelegationClaims
Source§impl<'de> Deserialize<'de> for DelegationClaims
impl<'de> Deserialize<'de> for DelegationClaims
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 DelegationClaims
impl RefUnwindSafe for DelegationClaims
impl Send for DelegationClaims
impl Sync for DelegationClaims
impl Unpin for DelegationClaims
impl UnsafeUnpin for DelegationClaims
impl UnwindSafe for DelegationClaims
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