#[non_exhaustive]pub struct SdJwtValidationOptions {
pub time: TimeOptions,
pub key_binding: Option<KeyBindingOptions>,
pub status: StatusPolicy,
pub reject_legacy_typ: bool,
pub additional_typ: BTreeSet<String>,
}sd-jwt only.Expand description
Options of SdJwtCredentialValidator.
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.time: TimeOptionsThe validation time and leeway of the issuer-signed JWT.
key_binding: Option<KeyBindingOptions>The key binding required, if any; a key binding JWT is not verified otherwise.
status: StatusPolicyWhat to do about status (and credentialStatus).
reject_legacy_typ: boolWhether to reject the pre-standard typ: vc+sd-jwt on an SD-JWT VC.
additional_typ: BTreeSet<String>Header typ values accepted for a VCDM 2.0 credential besides vc+sd-jwt; none by
default. A token without typ is always accepted there. An SD-JWT VC’s typ is fixed
by its specification and not affected.
Implementations§
Source§impl SdJwtValidationOptions
impl SdJwtValidationOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Default options: validate now without leeway, no key binding required,
StatusPolicy::Strict, vc+sd-jwt accepted.
Sourcepub fn with_time(self, time: TimeOptions) -> Self
pub fn with_time(self, time: TimeOptions) -> Self
These options with time.
Sourcepub fn with_key_binding(self, key_binding: KeyBindingOptions) -> Self
pub fn with_key_binding(self, key_binding: KeyBindingOptions) -> Self
These options requiring key_binding.
Sourcepub fn with_status(self, status: StatusPolicy) -> Self
pub fn with_status(self, status: StatusPolicy) -> Self
These options with status.
Sourcepub fn rejecting_legacy_typ(self) -> Self
pub fn rejecting_legacy_typ(self) -> Self
These options rejecting typ: vc+sd-jwt on an SD-JWT VC.
Sourcepub fn with_additional_typ(self, typ: impl Into<String>) -> Self
pub fn with_additional_typ(self, typ: impl Into<String>) -> Self
These options also accepting a VCDM 2.0 credential whose header typ is typ.
Trait Implementations§
Source§impl Clone for SdJwtValidationOptions
impl Clone for SdJwtValidationOptions
Source§impl Debug for SdJwtValidationOptions
impl Debug for SdJwtValidationOptions
Source§impl Default for SdJwtValidationOptions
impl Default for SdJwtValidationOptions
impl Eq for SdJwtValidationOptions
Source§impl PartialEq for SdJwtValidationOptions
impl PartialEq for SdJwtValidationOptions
impl StructuralPartialEq for SdJwtValidationOptions
Auto Trait Implementations§
impl Freeze for SdJwtValidationOptions
impl RefUnwindSafe for SdJwtValidationOptions
impl Send for SdJwtValidationOptions
impl Sync for SdJwtValidationOptions
impl Unpin for SdJwtValidationOptions
impl UnsafeUnpin for SdJwtValidationOptions
impl UnwindSafe for SdJwtValidationOptions
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
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.