#[non_exhaustive]pub struct CredentialValidationOptions {
pub time: TimeOptions,
pub status: StatusPolicy,
pub additional_typ: BTreeSet<String>,
}Available on crate feature
vc only.Expand description
Options of JwtCredentialValidator.
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.time: TimeOptionsThe validation time and leeway.
status: StatusPolicyWhat to do about credentialStatus.
additional_typ: BTreeSet<String>Header typ values accepted besides the profile’s own (JWT for VCDM 1.1, vc+jwt
for VCDM 2.0); none by default. A token without typ is always accepted.
Implementations§
Source§impl CredentialValidationOptions
impl CredentialValidationOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Default options: validate now without leeway, StatusPolicy::Strict.
Sourcepub fn with_time(self, time: TimeOptions) -> Self
pub fn with_time(self, time: TimeOptions) -> Self
These options with time.
Sourcepub fn with_status(self, status: StatusPolicy) -> Self
pub fn with_status(self, status: StatusPolicy) -> Self
These options with status.
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 credential whose header typ is typ.
Trait Implementations§
Source§impl Clone for CredentialValidationOptions
impl Clone for CredentialValidationOptions
Source§impl Debug for CredentialValidationOptions
impl Debug for CredentialValidationOptions
impl Eq for CredentialValidationOptions
impl StructuralPartialEq for CredentialValidationOptions
Auto Trait Implementations§
impl Freeze for CredentialValidationOptions
impl RefUnwindSafe for CredentialValidationOptions
impl Send for CredentialValidationOptions
impl Sync for CredentialValidationOptions
impl Unpin for CredentialValidationOptions
impl UnsafeUnpin for CredentialValidationOptions
impl UnwindSafe for CredentialValidationOptions
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.