Skip to content

Commit

Permalink
[INJIMOB-1862] use random uuid for mock VCs
Browse files Browse the repository at this point in the history
Signed-off-by: KiruthikaJeyashankar <[email protected]>
  • Loading branch information
KiruthikaJeyashankar committed Nov 5, 2024
1 parent dd34629 commit 47e26a4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import io.mosip.certify.api.spi.VCIssuancePlugin;
import io.mosip.certify.api.util.ErrorConstants;
import io.mosip.certify.core.exception.CertifyException;
import io.mosip.certify.util.UUIDGenerator;
import io.mosip.esignet.core.dto.OIDCTransaction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
Expand Down Expand Up @@ -127,10 +128,12 @@ private JsonLDObject buildJsonLDWithLDProof(String accessTokenHash)
log.error("Unable to get KYC exchange data from MOCK", e);
}

String uuid = new UUIDGenerator().generate();

Map<String, Object> verCredJsonObject = new HashMap<>();
verCredJsonObject.put("@context", vcCredentialContexts);
verCredJsonObject.put("type", Arrays.asList("VerifiableCredential", "MockVerifiableCredential"));
verCredJsonObject.put("id", "urn:uuid:3978344f-8596-4c3a-a978-8fcaba3903c5");
verCredJsonObject.put("id", uuid);
verCredJsonObject.put("issuer", "did:example:123456789");
verCredJsonObject.put("issuanceDate", getUTCDateTime());
verCredJsonObject.put("credentialSubject", formattedMap);
Expand Down

0 comments on commit 47e26a4

Please sign in to comment.