-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated README.md files * Changed pom version (#134) Co-authored-by: ase-101 <> * [DSD-3393] Update init_values.yaml (#135) Signed-off-by: syed salman <[email protected]> * ES-90 bug fix (#139) Co-authored-by: ase-101 <> * ES-185 (#140) Co-authored-by: ase-101 <> * ES-185 (#141) * ES-185 * ES-185 --------- Signed-off-by: Anusha Sunkada <[email protected]> Co-authored-by: ase-101 <> * Changed pom version --------- Signed-off-by: syed salman <[email protected]> Signed-off-by: Anusha Sunkada <[email protected]> Co-authored-by: KONIJETI YASWANTHA NAGARJUNA <[email protected]> Co-authored-by: anshulv1401 <[email protected]> Co-authored-by: syed salman <[email protected]> Co-authored-by: ase-101 <>
- Loading branch information
1 parent
625e112
commit ea50c87
Showing
5 changed files
with
30 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,3 +66,4 @@ databases: | |
name: postgres-postgresql | ||
key: postgresql-password | ||
dml: 1 | ||
branch: develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,8 @@ | |
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import org.apache.commons.lang3.NotImplementedException; | ||
import io.mosip.esignet.api.exception.VCIExchangeException; | ||
import io.mosip.esignet.api.util.ErrorConstants; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
|
@@ -50,10 +51,9 @@ public class MockVCIssuancePlugin implements VCIssuancePlugin { | |
|
||
public static final String OIDC_SERVICE_APP_ID = "OIDC_SERVICE"; | ||
|
||
@SuppressWarnings({ "rawtypes", "unchecked" }) | ||
@Override | ||
public VCResult getVerifiableCredentialWithLinkedDataProof(VCRequestDto vcRequestDto, String holderId, | ||
Map<String, Object> identityDetails) { | ||
public VCResult<JsonLDObject> getVerifiableCredentialWithLinkedDataProof(VCRequestDto vcRequestDto, String holderId, | ||
Map<String, Object> identityDetails) throws VCIExchangeException { | ||
JsonLDObject vcJsonLdObject = null; | ||
try { | ||
VCResult vcResult = new VCResult(); | ||
|
@@ -64,21 +64,22 @@ public VCResult getVerifiableCredentialWithLinkedDataProof(VCRequestDto vcReques | |
} catch (Exception e) { | ||
log.error("Failed to build mock VC", e); | ||
} | ||
return null; | ||
throw new VCIExchangeException(); | ||
} | ||
|
||
private JsonLDObject buildDummyJsonLDWithLDProof(String holderId) | ||
throws IOException, GeneralSecurityException, JsonLDException, URISyntaxException { | ||
Map<String, Object> formattedMap = new HashMap<>(); | ||
formattedMap.put("id", holderId); | ||
formattedMap.put("name", "John Doe"); | ||
formattedMap.put("age", 30); | ||
formattedMap.put("email", "[email protected]"); | ||
formattedMap.put("gender", "Male"); | ||
|
||
Map<String, Object> verCredJsonObject = new HashMap<>(); | ||
verCredJsonObject.put("@context", Arrays.asList("https://www.w3.org/2018/credentials/v1")); | ||
verCredJsonObject.put("type", Arrays.asList("VerifiableCredential")); | ||
verCredJsonObject.put("@context", Arrays.asList("https://www.w3.org/2018/credentials/v1", "https://schema.org/")); | ||
verCredJsonObject.put("type", Arrays.asList("VerifiableCredential", "Person")); | ||
verCredJsonObject.put("id", "urn:uuid:3978344f-8596-4c3a-a978-8fcaba3903c5"); | ||
verCredJsonObject.put("issuer", "did:mock:123456789"); | ||
verCredJsonObject.put("issuer", "did:example:123456789"); | ||
verCredJsonObject.put("issuanceDate", getUTCDateTime()); | ||
verCredJsonObject.put("credentialSubject", formattedMap); | ||
|
||
|
@@ -119,8 +120,8 @@ private static String getUTCDateTime() { | |
|
||
@Override | ||
public VCResult<String> getVerifiableCredential(VCRequestDto vcRequestDto, String holderId, | ||
Map<String, Object> identityDetails) { | ||
throw new NotImplementedException("This method is not implemented"); | ||
Map<String, Object> identityDetails) throws VCIExchangeException { | ||
throw new VCIExchangeException(ErrorConstants.NOT_IMPLEMENTED); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters