#[non_exhaustive]pub struct KeyBindingOptions {
pub audience: String,
pub nonce: String,
pub time: TimeOptions,
pub max_age: Option<Duration>,
}Available on crate feature
sd-jwt only.Expand description
What a key binding JWT must prove (RFC 9901 §7.3, step 5).
The key binding JWT must be signed by the holder’s key the credential’s cnf names: by
value in cnf.jwk, or by reference in cnf.kid, an absolute DID URL the validator’s
KeyResolver resolves for KeyRole::Subject (authentication).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.audience: StringThe audience the key binding JWT must name: this verifier.
nonce: StringThe nonce it must carry: the one of this transaction.
time: TimeOptionsThe time its iat is checked against, with leeway.
max_age: Option<Duration>How old it may be, if bounded.
Implementations§
Source§impl KeyBindingOptions
impl KeyBindingOptions
Sourcepub fn new(audience: impl Into<String>, nonce: impl Into<String>) -> Self
pub fn new(audience: impl Into<String>, nonce: impl Into<String>) -> Self
Key binding for audience with nonce, checked at the current time with no age
bound.
Sourcepub fn with_time(self, time: TimeOptions) -> Self
pub fn with_time(self, time: TimeOptions) -> Self
These options checking iat against time.
Sourcepub fn with_max_age(self, max_age: Duration) -> Self
pub fn with_max_age(self, max_age: Duration) -> Self
These options rejecting a key binding JWT older than max_age.
Trait Implementations§
Source§impl Clone for KeyBindingOptions
impl Clone for KeyBindingOptions
Source§impl Debug for KeyBindingOptions
impl Debug for KeyBindingOptions
impl Eq for KeyBindingOptions
Source§impl PartialEq for KeyBindingOptions
impl PartialEq for KeyBindingOptions
impl StructuralPartialEq for KeyBindingOptions
Auto Trait Implementations§
impl Freeze for KeyBindingOptions
impl RefUnwindSafe for KeyBindingOptions
impl Send for KeyBindingOptions
impl Sync for KeyBindingOptions
impl Unpin for KeyBindingOptions
impl UnsafeUnpin for KeyBindingOptions
impl UnwindSafe for KeyBindingOptions
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,
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
Compare self to
key and return true if they are equal.