#[non_exhaustive]pub struct DisclosableClaim {
pub name: String,
pub value: Value,
}Expand description
A claim an issuer wants to make selectively disclosable, instead of stamping it directly onto the JWT payload.
Handed to TokenManager::issue_sd_jwt in a batch; each one becomes
one Disclosure (with its own fresh salt — see
[generate_disclosure_salt]) and one digest in the issued token’s
_sd[].
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe claim name, e.g. "email". Must not collide with a
[RESERVED_CLAIM_NAMES] entry — TokenManager::issue_sd_jwt
does not currently validate this at issuance time (that check is
enforced on the verify side, where it actually matters for
security); an issuer accidentally naming a Disclosure "aud"
simply produces a Disclosure no verifier using this module will
ever accept.
value: ValueThe claim value. Any JSON value is accepted (object, array, string, number, bool, null) — this module does not interpret it.
Implementations§
Trait Implementations§
Source§impl Clone for DisclosableClaim
impl Clone for DisclosableClaim
Source§fn clone(&self) -> DisclosableClaim
fn clone(&self) -> DisclosableClaim
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DisclosableClaim
impl Debug for DisclosableClaim
impl Eq for DisclosableClaim
Source§impl PartialEq for DisclosableClaim
impl PartialEq for DisclosableClaim
impl StructuralPartialEq for DisclosableClaim
Auto Trait Implementations§
impl Freeze for DisclosableClaim
impl RefUnwindSafe for DisclosableClaim
impl Send for DisclosableClaim
impl Sync for DisclosableClaim
impl Unpin for DisclosableClaim
impl UnsafeUnpin for DisclosableClaim
impl UnwindSafe for DisclosableClaim
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.