#[non_exhaustive]pub struct PresentationValidationOptions {
pub time: TimeOptions,
pub audience: Option<String>,
pub nonce: Option<String>,
pub subject_holder: SubjectHolderRelationship,
pub credentials: CredentialValidationOptions,
pub fail_fast: FailFast,
}vc only.Expand description
Options of JwtPresentationValidator.
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 presentation JWT.
audience: Option<String>The audience the presentation must name in aud, if any is required.
nonce: Option<String>The nonce the presentation must carry, if one is required.
subject_holder: SubjectHolderRelationshipHow credential subjects must relate to the holder.
credentials: CredentialValidationOptionsThe options every presented credential is validated with.
fail_fast: FailFastWhether to stop at the first failing credential.
Implementations§
Source§impl PresentationValidationOptions
impl PresentationValidationOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Default options: validate now without leeway, no audience or nonce required,
SubjectHolderRelationship::AlwaysSubject, default credential options,
FailFast::FirstError.
Sourcepub fn with_time(self, time: TimeOptions) -> Self
pub fn with_time(self, time: TimeOptions) -> Self
These options with time, for the presentation JWT only.
Sourcepub fn with_audience(self, audience: impl Into<String>) -> Self
pub fn with_audience(self, audience: impl Into<String>) -> Self
These options requiring audience.
Sourcepub fn with_nonce(self, nonce: impl Into<String>) -> Self
pub fn with_nonce(self, nonce: impl Into<String>) -> Self
These options requiring nonce.
Sourcepub fn with_subject_holder(
self,
relationship: SubjectHolderRelationship,
) -> Self
pub fn with_subject_holder( self, relationship: SubjectHolderRelationship, ) -> Self
These options with relationship.
Sourcepub fn with_credentials(self, credentials: CredentialValidationOptions) -> Self
pub fn with_credentials(self, credentials: CredentialValidationOptions) -> Self
These options validating credentials with credentials.
Sourcepub fn with_fail_fast(self, fail_fast: FailFast) -> Self
pub fn with_fail_fast(self, fail_fast: FailFast) -> Self
These options with fail_fast.
Trait Implementations§
impl Eq for PresentationValidationOptions
impl StructuralPartialEq for PresentationValidationOptions
Auto Trait Implementations§
impl Freeze for PresentationValidationOptions
impl RefUnwindSafe for PresentationValidationOptions
impl Send for PresentationValidationOptions
impl Sync for PresentationValidationOptions
impl Unpin for PresentationValidationOptions
impl UnsafeUnpin for PresentationValidationOptions
impl UnwindSafe for PresentationValidationOptions
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.