From dc5495161291d1929c9ea26c5a19afadb9fb8bec Mon Sep 17 00:00:00 2001 From: Vishwa Date: Wed, 10 Jan 2024 23:37:15 +0530 Subject: [PATCH] =?UTF-8?q?Revert=20"[ES-504]=20Internal=20credential=20ob?= =?UTF-8?q?ject=20considered=20for=20forming=20the=20final=20=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/SunbirdRCVCIssuancePlugin.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sunbird-rc-esignet-integration-impl/src/main/java/io/mosip/esignet/sunbirdrc/integration/service/SunbirdRCVCIssuancePlugin.java b/sunbird-rc-esignet-integration-impl/src/main/java/io/mosip/esignet/sunbirdrc/integration/service/SunbirdRCVCIssuancePlugin.java index f2aba41..3ba6dc0 100644 --- a/sunbird-rc-esignet-integration-impl/src/main/java/io/mosip/esignet/sunbirdrc/integration/service/SunbirdRCVCIssuancePlugin.java +++ b/sunbird-rc-esignet-integration-impl/src/main/java/io/mosip/esignet/sunbirdrc/integration/service/SunbirdRCVCIssuancePlugin.java @@ -64,8 +64,6 @@ public class SunbirdRCVCIssuancePlugin implements VCIssuancePlugin { private static final String STATIC_VALUE_MAP_ISSUER_ID = "static-value-map.issuerId"; - private static final String CREDENTIAL_OBJECT_KEY = "credential"; - @Autowired Environment env; @@ -146,7 +144,7 @@ public VCResult getVerifiableCredentialWithLinkedDataProof(VCReque Map vcResponseMap =sendCredentialIssueRequest(credentialRequestMap); VCResult vcResult = new VCResult(); - JsonLDObject vcJsonLdObject = JsonLDObject.fromJsonObject(vcResponseMap.get(CREDENTIAL_OBJECT_KEY)); + JsonLDObject vcJsonLdObject = JsonLDObject.fromJsonObject(vcResponseMap); vcResult.setCredential(vcJsonLdObject); vcResult.setFormat(LINKED_DATA_PROOF_VC_FORMAT); return vcResult; @@ -275,4 +273,11 @@ private void validateContextUrl(Template template,List vcRequestContextL throw new VCIExchangeException(ErrorConstants.VCI_EXCHANGE_FAILED); } } + + private static Date calculateNowPlus30Days() { + // Implement your logic to calculate current date + 30 days + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DAY_OF_MONTH, 30); + return calendar.getTime(); + } }