diff --git a/wizard-core/src/main/java/eu/gaiax/wizard/core/service/signer/SignerService.java b/wizard-core/src/main/java/eu/gaiax/wizard/core/service/signer/SignerService.java index 77036ae..0c2e309 100644 --- a/wizard-core/src/main/java/eu/gaiax/wizard/core/service/signer/SignerService.java +++ b/wizard-core/src/main/java/eu/gaiax/wizard/core/service/signer/SignerService.java @@ -126,13 +126,13 @@ private Map prepareCredentialSubjectForLegalParticipant(Particip //Add @context in the credential legalParticipant.put(CONTEXT, this.contextConfig.participant()); legalParticipant.put(TYPE, List.of(VERIFIABLE_CREDENTIAL)); - legalParticipant.put(ID, participant.getDid()); + String participantJsonUrl = this.formParticipantJsonUrl(participant.getDomain(), participant.getId()); + legalParticipant.put(ID, participantJsonUrl + "#0"); legalParticipant.put(ISSUER, participant.getDid()); String issuanceDate = LocalDateTime.now().atZone(ZoneOffset.UTC).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); legalParticipant.put(ISSUANCE_DATE, issuanceDate); Map participantCredentialSubject = this.mapper.convertValue(legalParticipant.get(CREDENTIAL_SUBJECT), typeReference); - String participantJsonUrl = this.formParticipantJsonUrl(participant.getDomain(), participant.getId()); participantCredentialSubject.put(ID, participantJsonUrl + "#0"); participantCredentialSubject.put(TYPE, GX_LEGAL_PARTICIPANT); String registrationId = participantJsonUrl + "#1"; @@ -147,7 +147,7 @@ private Map prepareCredentialSubjectForLegalParticipant(Particip Map tncVc = new TreeMap<>(); tncVc.put(CONTEXT, this.contextConfig.tnc()); tncVc.put(TYPE, List.of(VERIFIABLE_CREDENTIAL)); - tncVc.put(ID, participant.getDid()); + tncVc.put(ID, participantJsonUrl + "#2"); tncVc.put(ISSUER, participant.getDid()); tncVc.put(ISSUANCE_DATE, issuanceDate);