diff --git a/frontend/package.json b/frontend/package.json
index 923b355..6d7963c 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -6,6 +6,7 @@
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"serve": "vue-cli-service serve",
+ "dev": "vue-cli-service serve",
"test:e2e": "vue-cli-service test:e2e",
"test:unit": "vue-cli-service test:unit"
},
diff --git a/frontend/src/components/PresentationRequest.vue b/frontend/src/components/PresentationRequest.vue
index af42e28..8dbddc8 100644
--- a/frontend/src/components/PresentationRequest.vue
+++ b/frontend/src/components/PresentationRequest.vue
@@ -3,12 +3,13 @@
Registering presentation request
-
-
+
Please configure your presentation request
@@ -28,7 +29,7 @@ import QrcodeVue from 'qrcode.vue';
export default {
name: 'PresentationRequest',
props: {
- credentialType: String,
+ credentialTypes: Array,
mode: {
type: String,
default: 'verify'
@@ -56,8 +57,11 @@ export default {
if (this.intervalId) clearInterval(this.intervalId)
},
watch: {
- credentialType() {
- this.registerPresentationRequest();
+ credentialTypes: {
+ handler() {
+ this.registerPresentationRequest();
+ },
+ deep: true
}
},
computed: {
@@ -70,11 +74,15 @@ export default {
}
},
presentationDefinition() {
- return {
+ const definition = {
"id": "eecc_verifier_request",
"input_descriptors": [
+ ]
+ }
+ for (const credentialType of this.credentialTypes) {
+ definition.input_descriptors.push(
{
- "id": "eecc_verifier_request_" + this.credentialType || "VerifiableCredential",
+ "id": "eecc_verifier_request_" + credentialType || "VerifiableCredential",
"format": {
"ldp_vc": {
"proof_type": [
@@ -93,15 +101,18 @@ export default {
"type": "array",
"contains": {
"type": "string",
- "const": this.credentialType || "VerifiableCredential"
+ "pattern": credentialType || "VerifiableCredential"
}
}
}
]
}
}
- ]
+ );
+
}
+ return definition;
+
},
presentationRequest() {
return {
diff --git a/frontend/src/views/PresentationRequest.vue b/frontend/src/views/PresentationRequest.vue
index b7d9723..cd1f9e3 100644
--- a/frontend/src/views/PresentationRequest.vue
+++ b/frontend/src/views/PresentationRequest.vue
@@ -10,7 +10,7 @@
aria-label="API Docs">
-
+
Define which credentials you want to have presented
@@ -32,22 +32,22 @@
-
+