Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed base64url encoding. #49

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public String generateTrustListVerificationId(SignerInformationEntity signerInfo
}

return getDocumentId(false) + stringBuilder + SEPARATOR_DID_ID
+ encodeKid(signerInformationEntity.getKid());
+ signerInformationEntity.getKid();
}
}

Expand Down Expand Up @@ -266,7 +266,7 @@ public void job() {
() -> signerInformationEntitiesList,
Collections::emptyList,
() -> new ArrayList<>(
signerInformationEntitiesList.stream().map(entity -> encodeKid(entity.getKid()))
signerInformationEntitiesList.stream().map(entity -> entity.getKid())
.collect(Collectors.toSet()))));
})));

Expand All @@ -282,7 +282,7 @@ public void job() {
() -> signerInformationEntitiesList,
Collections::emptyList,
() -> new ArrayList<>(
signerInformationEntitiesList.stream().map(entity -> encodeKid(entity.getKid()))
signerInformationEntitiesList.stream().map(entity -> entity.getKid())
.collect(Collectors.toSet()))));
}));

Expand All @@ -298,7 +298,7 @@ public void job() {
() -> signerInformationEntitiesList,
Collections::emptyList,
() -> new ArrayList<>(
signerInformationEntitiesList.stream().map(entity -> encodeKid(entity.getKid()))
signerInformationEntitiesList.stream().map(entity -> entity.getKid())
.collect(Collectors.toSet()))));

}));
Expand Down Expand Up @@ -332,7 +332,7 @@ public void job() {
Collections::emptyList,
() -> new ArrayList<>(
signerInformationEntitiesList.stream()
.map(entity -> encodeKid(entity.getKid()))
.map(entity -> entity.getKid())
.collect(Collectors.toSet()))));
});

Expand All @@ -359,7 +359,7 @@ public void job() {
signerInformationEntitiesList.forEach(entity -> {
didSpecifications.add(new DidSpecification(
List.of(domain, getParticipantCode(country), getMappedGroupName(group),
encodeKid(entity.getKid())),
entity.getKid()),

() -> signerInformationService.getCertificatesByDomainParticipantGroupKid(
domain, country, group, entity.getKid()),
Expand All @@ -382,7 +382,7 @@ public void job() {

didSpecifications.add(new DidSpecification(
List.of(WILDCARD_CHAR, getParticipantCode(country), getMappedGroupName(group),
encodeKid(entity.getKid())),
entity.getKid()),

() -> signerInformationService.getCertificatesByKidGroupCountry(
country, group, entity.getKid()),
Expand All @@ -402,7 +402,7 @@ public void job() {
signerInformationEntitiesList.forEach(entity -> {
didSpecifications.add(new DidSpecification(
List.of(domain, WILDCARD_CHAR, getMappedGroupName(group),
encodeKid(entity.getKid())),
entity.getKid()),

() -> signerInformationService.getCertificatesByDomainGroupKid(
domain, group, entity.getKid()),
Expand All @@ -421,7 +421,7 @@ public void job() {
signerInformationEntitiesList.forEach(entity -> {
didSpecifications.add(new DidSpecification(
List.of(WILDCARD_CHAR, WILDCARD_CHAR, getMappedGroupName(group),
encodeKid(entity.getKid())),
entity.getKid()),

() -> signerInformationService.getCertificatesByGroupKid(group, entity.getKid()),

Expand Down Expand Up @@ -622,7 +622,7 @@ private void addTrustListEntry(DidTrustList trustList,
trustListEntry.setType("JsonWebKey2020");
trustListEntry.setId(specification.generateTrustListVerificationId(signerInformationEntity));
trustListEntry.setController(specification.getControllerId(false));
publicKeyJwk.setKid(encodeKid(signerInformationEntity.getKid()));
publicKeyJwk.setKid(signerInformationEntity.getKid());
trustListEntry.setPublicKeyJwk(publicKeyJwk);

trustList.getVerificationMethod().add(trustListEntry);
Expand Down Expand Up @@ -703,7 +703,4 @@ private String generateNonce() {
return nonce.toString();
}

private String encodeKid(String kid) {
return Base64URL.encode(kid).toString();
}
}
Loading
Loading