identity_credential/validator/sd_jwt/
error.rsuse crate::validator::JwtValidationError;
#[derive(Debug, thiserror::Error, strum::IntoStaticStr)]
#[non_exhaustive]
pub enum KeyBindingJwtError {
#[error("KB-JWT is invalid")]
JwtValidationError(#[from] JwtValidationError),
#[error("Deserialization error")]
DeserializationError(String),
#[error("SdJwt Error {0}")]
SdJwtError(#[from] sd_jwt_payload::Error),
#[error("the `_sd_hash` value of the KB-JWT does not match the derived value from the provided SD-JWT")]
InvalidDigest,
#[error("provided nonce does not match the KB-JWT nonce claim")]
InvalidNonce,
#[error("provided audiance value does not match the KB-JWT `aud` claim")]
AudianceMismatch,
#[error("KB-JWT `iat` value is invalid, {0}")]
IssuanceDate(String),
#[error("the provided SD-JWT does not include a KB-JWT")]
MissingKeyBindingJwt,
#[error("header `typ` value is missing or not equal to `kb+jwt`")]
InvalidHeaderTypValue,
}