Skip to content

Commit

Permalink
allow multi status in UI
Browse files Browse the repository at this point in the history
Signed-off-by: F-Node-Karlsruhe <[email protected]>
  • Loading branch information
F-Node-Karlsruhe committed Nov 21, 2023
1 parent 0e279e6 commit a10bb7c
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 21 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ VC Verifier Changelog
WIP
---


1.7.7 (2023-11-21)
---

- prevent caching of status credentials in document loader
- support mutli status list results in UI


1.7.6 (2023-11-15)
Expand Down
20 changes: 10 additions & 10 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vc-verifier",
"version": "1.7.6",
"version": "1.7.7",
"description": "The EECC verifier for verifiable credentials which provides an verification API as well as the corresponding UI.",
"main": "index.js",
"type": "module",
Expand Down Expand Up @@ -32,8 +32,8 @@
"@digitalbazaar/ed25519-signature-2018": "^4.0.0",
"@digitalbazaar/ed25519-signature-2020": "^5.2.0",
"@digitalbazaar/vc": "^6.2.0",
"@digitalbazaar/vc-revocation-list": "^5.0.0",
"@digitalbazaar/vc-status-list": "^7.0.0",
"@digitalbazaar/vc-revocation-list": "^5.0.1",
"@digitalbazaar/vc-status-list": "^7.1.0",
"cors": "^2.8.5",
"did-resolver": "^4.1.0",
"dotenv": "^16.3.1",
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "verifier_frontend",
"version": "1.7.6",
"version": "1.7.7",
"description": "Vue frontend for the EECC vc verifier API",
"scripts": {
"build": "vue-cli-service build",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Credential.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export default {
});
},
getStateColor(credential) {
if (credential.revoked) return 'danger';
if (credential.suspended) return 'warning';
if (credential.verified === false) return 'danger';
return 'success';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import api from '../api'

export default createStore({
state: {
version: '1.7.6',
version: '1.7.7',
authentication: undefined,
verifiables: [],
disclosedCredentials: [],
Expand Down
35 changes: 29 additions & 6 deletions frontend/src/views/Verify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,41 @@ export default {
if (result.statusResult && !result.statusResult.verified) {
// TODO also make status arrays recognize suspension
if (credential.credentialStatus.statusPurpose && credential.credentialStatus.statusPurpose == 'suspension') {
if (result.statusResult.results) {
credentialResult.suspended = true;
const failedStatuses = result.statusResult.results.filter(r => !r.verified)
message = 'Credential suspended!';
if (failedStatuses.filter(fs => fs.credentialStatus.statusPurpose === 'suspension').length > 0) {
credentialResult.suspended = true;
message = 'Credential suspended!';
}
if (failedStatuses.filter(fs => fs.credentialStatus.statusPurpose === 'revocation').length > 0) {
credentialResult.revoked = true;
message = 'Credential revoked!';
}
} else {
credentialResult.revoked = true;
if (credential.credentialStatus.statusPurpose && credential.credentialStatus.statusPurpose == 'suspension') {
credentialResult.suspended = true;
message = 'Credential suspended!';
} else {
credentialResult.revoked = true;
message = 'Credential revoked!';
message = 'Credential revoked!';
}
}
Expand Down

0 comments on commit a10bb7c

Please sign in to comment.