identity_credential/validator/jpt_presentation_validation/
decoded_jpt_presentation.rs

1// Copyright 2020-2024 IOTA Stiftung, Fondazione Links
2// SPDX-License-Identifier: Apache-2.0
3
4use identity_core::common::Object;
5use identity_core::common::Url;
6use jsonprooftoken::jwp::presented::JwpPresented;
7
8use crate::credential::Credential;
9
10/// Decoded [`Credential`] from a cryptographically verified JWP.
11#[non_exhaustive]
12#[derive(Debug, Clone)]
13pub struct DecodedJptPresentation<T = Object> {
14  /// The decoded credential parsed to the [Verifiable Credentials Data model](https://www.w3.org/TR/vc-data-model/).
15  pub credential: Credential<T>,
16  /// The `aud` property parsed from the JWT claims.
17  pub aud: Option<Url>,
18  /// The custom claims parsed from the JPT.
19  pub custom_claims: Option<Object>,
20  /// The decoded and verifier Issued JWP, will be used to construct the Presented JWP
21  pub decoded_jwp: JwpPresented,
22}