diff --git a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/constant/StringPool.java b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/constant/StringPool.java index 83768e6a..c14c7530 100644 --- a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/constant/StringPool.java +++ b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/constant/StringPool.java @@ -96,7 +96,6 @@ private StringPool() { public static final String BPN_CREDENTIAL = "BpnCredential"; public static final String ASSERTION_METHOD = "assertionMethod"; - public static final String CONTEXT = "@context"; public static final String SERVICE_ENDPOINT = "serviceEndpoint"; public static final String SERVICE = "service"; public static final String SECURITY_TOKEN_SERVICE = "SecurityTokenService"; diff --git a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/JwtPresentationES256KService.java b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/JwtPresentationES256KService.java index 71d02d40..a82efae0 100644 --- a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/JwtPresentationES256KService.java +++ b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/JwtPresentationES256KService.java @@ -40,6 +40,7 @@ import org.eclipse.tractusx.managedidentitywallets.exception.BadDataException; import org.eclipse.tractusx.managedidentitywallets.exception.SignatureFailureException; import org.eclipse.tractusx.managedidentitywallets.exception.UnsupportedAlgorithmException; +import org.eclipse.tractusx.ssi.lib.model.JsonLdObject; import org.eclipse.tractusx.ssi.lib.model.did.Did; import org.eclipse.tractusx.ssi.lib.model.did.DidDocument; import org.eclipse.tractusx.ssi.lib.model.did.DidDocumentBuilder; @@ -132,7 +133,7 @@ public DidDocument buildDidDocument(String bpn, Did did, List ids = new ArrayList<>(); jwkVerificationMethods.forEach((verificationMethod) -> { @@ -142,11 +143,11 @@ public DidDocument buildDidDocument(String bpn, Did did, List serviceData = Map.of(Verifiable.ID, did.toUri()+"#"+StringPool.SECURITY_TOKEN_SERVICE, Verifiable.TYPE, StringPool.SECURITY_TOKEN_SERVICE, StringPool.SERVICE_ENDPOINT, StringPool.HTTPS_SCHEME + miwSettings.host() + "/api/token"); - org.eclipse.tractusx.ssi.lib.model.did.Service service1 = new org.eclipse.tractusx.ssi.lib.model.did.Service(serviceData); + org.eclipse.tractusx.ssi.lib.model.did.Service tokenService = new org.eclipse.tractusx.ssi.lib.model.did.Service(serviceData); Map serviceData2 = Map.of(Verifiable.ID, did.toUri()+"#"+StringPool.CREDENTIAL_SERVICE, Verifiable.TYPE, StringPool.CREDENTIAL_SERVICE, StringPool.SERVICE_ENDPOINT, StringPool.HTTPS_SCHEME + miwSettings.host()); - org.eclipse.tractusx.ssi.lib.model.did.Service service2 = new org.eclipse.tractusx.ssi.lib.model.did.Service(serviceData2); - didDocument.put(StringPool.SERVICE, List.of(service1,service2)); + org.eclipse.tractusx.ssi.lib.model.did.Service credentialService = new org.eclipse.tractusx.ssi.lib.model.did.Service(serviceData2); + didDocument.put(StringPool.SERVICE, List.of(tokenService,credentialService)); didDocument = DidDocument.fromJson(didDocument.toJson()); log.debug("did document created for bpn ->{}", StringEscapeUtils.escapeJava(bpn));