Skip to content

Commit

Permalink
[INJIWEB-1151]: bypass VC verification for mock issuer (mosip#519)
Browse files Browse the repository at this point in the history
Signed-off-by: Vijay Kumar S <[email protected]>
  • Loading branch information
vijay151096 authored Nov 20, 2024
1 parent 961a260 commit dc68eb6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public ByteArrayInputStream downloadCredentialAsPDF(String issuerId, String cred
CredentialsSupportedResponse credentialsSupportedResponse = issuerService.getIssuerWellknownForCredentialType(issuerId, credentialType);
VCCredentialRequest vcCredentialRequest = generateVCCredentialRequest(issuerConfig, credentialIssuerWellKnownResponse, credentialsSupportedResponse, response.getAccess_token());
VCCredentialResponse vcCredentialResponse = downloadCredential(credentialIssuerWellKnownResponse.getCredentialEndPoint(), vcCredentialRequest, response.getAccess_token());
boolean verificationStatus = verifyCredential(vcCredentialResponse);
boolean verificationStatus = issuerId.toLowerCase().contains("mock") || verifyCredential(vcCredentialResponse);
if(verificationStatus) {
String dataShareUrl = QRCodeType.OnlineSharing.equals(issuerConfig.getQr_code_type()) ? dataShareService.storeDataInDataShare(objectMapper.writeValueAsString(vcCredentialResponse), credentialValidity) : "";
return generatePdfForVerifiableCredentials(vcCredentialResponse, issuerConfig, credentialsSupportedResponse, dataShareUrl, credentialValidity);
Expand Down

0 comments on commit dc68eb6

Please sign in to comment.