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