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 3ba6dc0..f2aba41 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,6 +64,8 @@ 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; @@ -144,7 +146,7 @@ public VCResult getVerifiableCredentialWithLinkedDataProof(VCReque Map vcResponseMap =sendCredentialIssueRequest(credentialRequestMap); VCResult vcResult = new VCResult(); - JsonLDObject vcJsonLdObject = JsonLDObject.fromJsonObject(vcResponseMap); + JsonLDObject vcJsonLdObject = JsonLDObject.fromJsonObject(vcResponseMap.get(CREDENTIAL_OBJECT_KEY)); vcResult.setCredential(vcJsonLdObject); vcResult.setFormat(LINKED_DATA_PROOF_VC_FORMAT); return vcResult; @@ -273,11 +275,4 @@ 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(); - } }