Skip to content

Commit

Permalink
fix: status list changed to 2021 from bitstring
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-vavdiya committed Sep 9, 2024
1 parent df62fcc commit 546908b
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 39 deletions.
62 changes: 31 additions & 31 deletions miw/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
import java.net.URI;

@ConfigurationProperties(prefix = "miw.revocation")
public record RevocationSettings(URI url, URI bitStringStatusListContext) {
public record RevocationSettings(URI url, URI statusList2021Context) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ public CredentialsResponse issueCredential(Map<String, Object> data, String call

//add revocation context if missing
List<URI> uris = verifiableCredential.getContext();
if (!uris.contains(revocationSettings.bitStringStatusListContext())) {
uris.add(revocationSettings.bitStringStatusListContext());
if (!uris.contains(revocationSettings.statusList2021Context())) {
uris.add(revocationSettings.statusList2021Context());
builder.contexts(uris);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ public CredentialsResponse issueCredentialUsingBaseWallet(String holderDid, Map<

//add revocation context if missing
List<URI> uris = miwSettings.vcContexts();
if (!uris.contains(revocationSettings.bitStringStatusListContext())) {
uris.add(revocationSettings.bitStringStatusListContext());
if (!uris.contains(revocationSettings.statusList2021Context())) {
uris.add(revocationSettings.statusList2021Context());
builder.contexts(uris);
}

Expand Down
2 changes: 1 addition & 1 deletion miw/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ miw:
refresh-token-url: ${miw.security.token-url}
revocation:
url: ${REVOCATION_SERVICE_URL:http://localhost:8081}
bitStringStatusListContext: ${BITSTRING_STATUS_LIST_CONTEXT_URL:https://w3c.github.io/vc-bitstring-status-list/contexts/v1.jsonld}
statusList2021Context: ${STATUS_LIST_2021_CONTEXT_URL:https://w3id.org/vc/status-list/2021/v1}


sts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static void checkVC(VerifiableCredential verifiableCredential, MIWSetting
}

if (verifiableCredential.getVerifiableCredentialStatus() != null) {
Assertions.assertTrue(verifiableCredential.getContext().contains(revocationSettings.bitStringStatusListContext()));
Assertions.assertTrue(verifiableCredential.getContext().contains(revocationSettings.statusList2021Context()));
}
//check expiry date
Assertions.assertEquals(0, verifiableCredential.getExpirationDate().compareTo(miwSettings.vcExpiryDate().toInstant()));
Expand Down
2 changes: 1 addition & 1 deletion revocation-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ revocation:
refresh-token-url: ${revocation.security.keycloak.token-url}
miw:
url: ${MIW_URL:https://a888-203-129-213-107.ngrok-free.app}
vcContexts: ${VC_SCHEMA_LINK:https://www.w3.org/2018/credentials/v1, https://cofinity-x.github.io/schema-registry/w3c/v1.0/BitstringStatusList.json}
vcContexts: ${VC_SCHEMA_LINK:https://www.w3.org/2018/credentials/v1, https://w3id.org/vc/status-list/2021/v1}
domain:
url: ${DOMAIN_URL:https://977d-203-129-213-107.ngrok-free.app}

Expand Down

0 comments on commit 546908b

Please sign in to comment.