#[non_exhaustive]pub enum SdJwtValidationError {
Credential(SdJwtVcError),
CredentialV2(SdJwtCredentialV2Error),
LegacyTyp,
Validation(ValidationError),
KeyBindingRequired,
NoHolderKey(KeyReferenceError),
KeyBindingTooOld {
issued_at: DateTime<Utc>,
now: DateTime<Utc>,
max_age: Duration,
},
SdHashMismatch {
expected: String,
found: Option<String>,
},
}sd-jwt only.Expand description
Why an SD-JWT credential did not validate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Credential(SdJwtVcError)
The SD-JWT is not a well-formed SD-JWT VC.
CredentialV2(SdJwtCredentialV2Error)
The SD-JWT is not a well-formed VCDM 2.0 credential secured with SD-JWT.
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(KeyReferenceError)
Key binding is required and cnf names no key this crate can look for: there is no
cnf, or KeyReference::from_confirmation refuses it.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<SdJwtCredentialV2Error> for SdJwtValidationError
impl From<SdJwtCredentialV2Error> for SdJwtValidationError
Source§fn from(source: SdJwtCredentialV2Error) -> Self
fn from(source: SdJwtCredentialV2Error) -> Self
Source§impl From<SdJwtValidationError> for ValidationError
Available on crate feature vc only.
impl From<SdJwtValidationError> for ValidationError
vc only.Source§fn from(error: SdJwtValidationError) -> Self
fn from(error: SdJwtValidationError) -> Self
Unwraps a shared check’s error; boxes the SD-JWT-specific ones.