Skip to content

Commit

Permalink
Merge pull request #34 from WorldHealthOrganization/feat/kid-in-verif…
Browse files Browse the repository at this point in the history
…ication-method

Feat: Add kid to DID VerificationMethod TrustListEntry
  • Loading branch information
f11h authored Jun 7, 2024
2 parents 04a9906 + dfaa76b commit 1e4d666
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ private void addTrustListEntry(DidTrustList trustList,
trustListEntry.setType("JsonWebKey2020");
trustListEntry.setId(specification.getEntryId(
URLEncoder.encode(signerInformationEntity.getKid(), StandardCharsets.UTF_8)));
trustListEntry.setKid(URLEncoder.encode(signerInformationEntity.getKid(), StandardCharsets.UTF_8));
trustListEntry.setController(specification.getDocumentId(false));
trustListEntry.setPublicKeyJwk(publicKeyJwk);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class DidTrustListEntry {

private String id;

private String kid;

private String type;

private String controller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ private void assertVerificationMethod(Object in, String kid, X509Certificate dsc
Assertions.assertEquals(parentDidId, jsonNode.get("controller"));
Assertions.assertEquals(parentDidId + "#" + URLEncoder.encode(kid, StandardCharsets.UTF_8),
jsonNode.get("id"));
Assertions.assertEquals(URLEncoder.encode(kid, StandardCharsets.UTF_8), jsonNode.get("kid"));

LinkedHashMap<?, ?> publicKeyJwk = (LinkedHashMap<?, ?>) jsonNode.get("publicKeyJwk");

Expand Down

0 comments on commit 1e4d666

Please sign in to comment.