From 4429211d8b3bcb999b35a268f4fe588b9b28ef20 Mon Sep 17 00:00:00 2001 From: Nitin Vavdiya Date: Mon, 12 Aug 2024 16:57:22 +0530 Subject: [PATCH] feat: status list VC type set to StatusList2021 --- .../revocation/dto/StatusListCredentialSubject.java | 6 +++--- .../revocation/services/HttpClientService.java | 3 ++- .../revocation/services/RevocationService.java | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/dto/StatusListCredentialSubject.java b/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/dto/StatusListCredentialSubject.java index 0482d48b..02971bb6 100644 --- a/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/dto/StatusListCredentialSubject.java +++ b/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/dto/StatusListCredentialSubject.java @@ -27,9 +27,9 @@ @Getter @Builder() public class StatusListCredentialSubject { - public static final String TYPE_ENTRY = "BitstringStatusListEntry"; - public static final String TYPE_CREDENTIAL = "BitstringStatusListCredential"; - public static final String TYPE_LIST = "BitstringStatusList"; + public static final String TYPE_ENTRY = "StatusList2021Entry"; + public static final String TYPE_CREDENTIAL = "StatusList2021"; + public static final String TYPE_LIST = "StatusList2021Credential"; public static final String SUBJECT_ID = "id"; public static final String SUBJECT_TYPE = "type"; diff --git a/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/services/HttpClientService.java b/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/services/HttpClientService.java index e2fde5e8..333c8762 100644 --- a/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/services/HttpClientService.java +++ b/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/services/HttpClientService.java @@ -22,6 +22,7 @@ package org.eclipse.tractusx.managedidentitywallets.revocation.services; import lombok.RequiredArgsConstructor; +import org.eclipse.tractusx.managedidentitywallets.commons.constant.StringPool; import org.eclipse.tractusx.managedidentitywallets.revocation.config.security.SecurityConfigProperties; import org.eclipse.tractusx.managedidentitywallets.revocation.dto.TokenResponse; import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredential; @@ -72,7 +73,7 @@ public VerifiableCredential signStatusListVC(VerifiableCredential vc, String tok String uri = UriComponentsBuilder.fromHttpUrl(miwUrl) .path("/api/credentials") - .queryParam("isRevocable", "false") + .queryParam(StringPool.REVOCABLE, "false") .build() .toUriString(); diff --git a/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/services/RevocationService.java b/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/services/RevocationService.java index ab273c17..e6033e8a 100644 --- a/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/services/RevocationService.java +++ b/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/services/RevocationService.java @@ -303,7 +303,7 @@ private StatusListCredential createStatusListCredential( VerifiableCredential statusListVC; StatusListCredentialSubject subject; types.add(VerifiableCredentialType.VERIFIABLE_CREDENTIAL); - types.add(StatusListCredentialSubject.TYPE_CREDENTIAL); + types.add(StatusListCredentialSubject.TYPE_LIST); bpn = extractBpnFromDid(dto.issuerId()); id = @@ -317,7 +317,7 @@ private StatusListCredential createStatusListCredential( StatusListCredentialSubject.builder() .id(id) .statusPurpose(dto.purpose().toLowerCase()) - .type(StatusListCredentialSubject.TYPE_LIST) + .type(StatusListCredentialSubject.TYPE_CREDENTIAL) .encodedList(BitSetManager.initializeEncodedListString()) .build();