pub struct VerifiedDelegation { /* private fields */ }Expand description
A successfully verified delegation token.
Implementations§
Source§impl VerifiedDelegation
impl VerifiedDelegation
Sourcepub fn claims(&self) -> &DelegationClaims
pub fn claims(&self) -> &DelegationClaims
Read claims only after successful cryptographic and standard-claim verification. The returned reference prevents callers from widening scopes after verification.
pub fn key_id(&self) -> &str
pub fn algorithm(&self) -> Algorithm
Sourcepub fn allows(
&self,
subject: &str,
action: &str,
resource: &str,
request_facts: &Value,
) -> bool
pub fn allows( &self, subject: &str, action: &str, resource: &str, request_facts: &Value, ) -> bool
Check whether this verified grant covers one concrete request.
subject must be the trusted identity of the acting agent, not a
value copied from an untrusted request. request_facts is the JSON
object against which optional constraints are evaluated. Missing
action/resource scopes and missing constraint paths fail closed.
This check does not establish that the issuer had authority to mint
the grant, nor does it provide revocation; callers must enforce those
properties separately.
Trait Implementations§
Source§impl Clone for VerifiedDelegation
impl Clone for VerifiedDelegation
Source§fn clone(&self) -> VerifiedDelegation
fn clone(&self) -> VerifiedDelegation
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for VerifiedDelegation
impl RefUnwindSafe for VerifiedDelegation
impl Send for VerifiedDelegation
impl Sync for VerifiedDelegation
impl Unpin for VerifiedDelegation
impl UnwindSafe for VerifiedDelegation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more