pub struct DelegationKey {
pub subject_id: String,
pub audience: String,
pub scopes: Vec<String>,
pub mode: DelegationMode,
}Expand description
Composite key for cached delegated tokens. Token cache lookups
hit on (subject, audience, scopes, mode) so different audiences
or scope sets for the same subject mint independent tokens.
scopes is a Vec<String> (not a HashSet) because Cedar / OPA
policies frequently care about scope order — ["read", "write"]
and ["write", "read"] may carry different semantics in some IdPs.
Callers that want set semantics should sort before constructing.
Fields§
§subject_id: String§audience: String§scopes: Vec<String>§mode: DelegationModeTrait Implementations§
Source§impl Clone for DelegationKey
impl Clone for DelegationKey
Source§fn clone(&self) -> DelegationKey
fn clone(&self) -> DelegationKey
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 DelegationKey
impl Debug for DelegationKey
Source§impl<'de> Deserialize<'de> for DelegationKey
impl<'de> Deserialize<'de> for DelegationKey
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
impl Eq for DelegationKey
Source§impl Hash for DelegationKey
impl Hash for DelegationKey
Source§impl PartialEq for DelegationKey
impl PartialEq for DelegationKey
Source§fn eq(&self, other: &DelegationKey) -> bool
fn eq(&self, other: &DelegationKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DelegationKey
impl Serialize for DelegationKey
impl StructuralPartialEq for DelegationKey
Auto Trait Implementations§
impl Freeze for DelegationKey
impl RefUnwindSafe for DelegationKey
impl Send for DelegationKey
impl Sync for DelegationKey
impl Unpin for DelegationKey
impl UnsafeUnpin for DelegationKey
impl UnwindSafe for DelegationKey
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.