pub fn decode_presentation_v2(
jwt: &Jwt,
) -> Result<DecodedPresentationV2, ValidationError>Available on crate feature
vc only.Expand description
Decodes a VCDM 2.0 presentation JWT and unwraps and decodes its credentials without
verifying or validating anything. A credential secured with SD-JWT (feature sd-jwt) has
its disclosures processed, which checks the digests, but no signature is verified.
ยงErrors
ValidationError::Jws, ValidationError::Payload, ValidationError::UnexpectedTyp
or ValidationError::Credential when the token, or one of its credentials, does not
decode, and ValidationError::SdJwt when an SD-JWT credential does not; an envelope of
a media type other than application/vc+jwt (or application/vc+sd-jwt) is a
CredentialError::UnsupportedMediaType. A vp+jwt payload, or a vc+jwt one, that is
the issuer-signed JWT of an SD-JWT is a ValidationError::SdJwtPayload.