#[non_exhaustive]pub enum SdJwtValidationError {
Credential(SdJwtVcError),
LegacyTyp,
Validation(ValidationError),
KeyBindingRequired,
NoHolderKey,
KeyBindingTooOld {
issued_at: DateTime<Utc>,
now: DateTime<Utc>,
max_age: Duration,
},
SdHashMismatch {
expected: String,
found: Option<String>,
},
}Available on crate feature
sd-jwt only.Expand description
Why an SD-JWT VC did not validate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Credential(SdJwtVcError)
The SD-JWT is not a well-formed SD-JWT VC.
LegacyTyp
The issuer-signed JWT has the pre-standard typ: vc+sd-jwt, which the options reject.
Validation(ValidationError)
A check shared with the JWT validators failed: kid, key resolution, signature,
issuer binding, time, audience, nonce, status.
KeyBindingRequired
Key binding is required and the SD-JWT carries no key binding JWT.
NoHolderKey
Key binding is required and the credential carries no holder key in cnf.
KeyBindingTooOld
The key binding JWT is older than allowed.
Fields
SdHashMismatch
The key binding JWT’s sd_hash is not the digest of the presented SD-JWT.
Trait Implementations§
Source§impl Debug for SdJwtValidationError
impl Debug for SdJwtValidationError
Source§impl Display for SdJwtValidationError
impl Display for SdJwtValidationError
Source§impl Error for SdJwtValidationError
impl Error for SdJwtValidationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<SdJwtVcError> for SdJwtValidationError
impl From<SdJwtVcError> for SdJwtValidationError
Source§fn from(source: SdJwtVcError) -> Self
fn from(source: SdJwtVcError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for SdJwtValidationError
impl From<ValidationError> for SdJwtValidationError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SdJwtValidationError
impl !UnwindSafe for SdJwtValidationError
impl Freeze for SdJwtValidationError
impl Send for SdJwtValidationError
impl Sync for SdJwtValidationError
impl Unpin for SdJwtValidationError
impl UnsafeUnpin for SdJwtValidationError
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