From 9b937e00c2fc949a3692e13c1ad5d5656904750e Mon Sep 17 00:00:00 2001 From: Abdulrahim Al Methiab Date: Tue, 12 Sep 2023 16:13:11 +0200 Subject: [PATCH] remove `vp` and `vc` from JWT claims in JOSE --- identity_jose/src/jwt/claims.rs | 34 --------------------------------- 1 file changed, 34 deletions(-) diff --git a/identity_jose/src/jwt/claims.rs b/identity_jose/src/jwt/claims.rs index a58e783e23..06a0bd9872 100644 --- a/identity_jose/src/jwt/claims.rs +++ b/identity_jose/src/jwt/claims.rs @@ -2,8 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 use identity_core::common::OneOrMany; -use serde_json::Map; -use serde_json::Value; /// JSON Web Token Claims /// @@ -47,16 +45,6 @@ pub struct JwtClaims { /// [More Info](https://tools.ietf.org/html/rfc7519#section-4.1.7) #[serde(skip_serializing_if = "Option::is_none")] jti: Option, // JWT ID - /// Contains the properties of a Verifiable Credential - /// - /// [More Info](https://w3c.github.io/vc-data-model/#json-web-token) - #[serde(skip_serializing_if = "Option::is_none")] - vc: Option>, // Verifiable Credential - /// Contains the properties of a Verifiable Presentation - /// - /// [More Info](https://w3c.github.io/vc-data-model/#json-web-token) - #[serde(skip_serializing_if = "Option::is_none")] - vp: Option>, // Verifiable Presentation /// Public/Private Claim Names /// /// [More Info](https://tools.ietf.org/html/rfc7519#section-4.2) @@ -75,8 +63,6 @@ impl JwtClaims { nbf: None, iat: None, jti: None, - vc: None, - vp: None, custom: None, } } @@ -151,26 +137,6 @@ impl JwtClaims { self.jti = Some(value.into()); } - /// Returns the value for the JWT verifiable credential claim (vc). - pub fn vc(&self) -> Option<&Map> { - self.vc.as_ref() - } - - /// Sets a value for the JWT verifiable credential claim (vc). - pub fn set_vc(&mut self, value: impl Into>) { - self.vc = Some(value.into()); - } - - /// Returns the value for the JWT verifiable presentation claim (vp). - pub fn vp(&self) -> Option<&Map> { - self.vp.as_ref() - } - - /// Sets a value for the JWT verifiable presentation claim (vp). - pub fn set_vp(&mut self, value: impl Into>) { - self.vp = Some(value.into()); - } - /// Returns a reference to the custom JWT claims. pub fn custom(&self) -> Option<&T> { self.custom.as_ref()