From f2fae29515739d7a56e59fed2ce040c306de6e12 Mon Sep 17 00:00:00 2001 From: Nikos Triantafyllou Date: Fri, 13 Sep 2024 13:39:49 +0300 Subject: [PATCH] vp metadata --- .../presentation_definition_alliance_and_education_Id.json | 2 +- package.json | 2 +- routes/routes.js | 2 +- routes/verifierRoutes.js | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/data/presentation_definition_alliance_and_education_Id.json b/data/presentation_definition_alliance_and_education_Id.json index 7623756..aaaef17 100644 --- a/data/presentation_definition_alliance_and_education_Id.json +++ b/data/presentation_definition_alliance_and_education_Id.json @@ -90,7 +90,7 @@ }, { "id": "educational-id-credential", - "name": "Educational ID Credential", + "name": "Student ID", "format": { "jwt_vc_json": { "alg": ["ES256", "ES384"] diff --git a/package.json b/package.json index 624c10b..7bf9d07 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "type": "module", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "dev": "SERVER_URL=https://7ef8-2a02-587-870d-e900-4699-6b46-3f50-4847.ngrok-free.app node server.js" + "dev": "SERVER_URL=https://53d6-2a02-587-870d-e900-2f53-2882-9444-e8a3.ngrok-free.app node server.js" }, "author": "", "license": "ISC", diff --git a/routes/routes.js b/routes/routes.js index 1cb50a6..1058b69 100644 --- a/routes/routes.js +++ b/routes/routes.js @@ -446,7 +446,7 @@ router.post("/credential", async (req, res) => { exp: Math.floor(Date.now() / 1000) + 60 * 60, // Token expiration time (1 hour from now) jti: "urn:did:1904a925-38bd-4eda-b682-4b5e3ca9d4bc", vc: { - type: ["EducationalID"], + type: ["StudentID"],//["EducationalID"], "@context": ["https://www.w3.org/2018/credentials/v1"], issuer: serverURL, credentialSubject: { diff --git a/routes/verifierRoutes.js b/routes/verifierRoutes.js index 20bcd4f..fe0f66e 100644 --- a/routes/verifierRoutes.js +++ b/routes/verifierRoutes.js @@ -321,6 +321,13 @@ verifierRouter.get("/vpRequest/:type/:id", async (req, res) => { // privateKey // ); let vpRequest = { + client_metadata: { + client_name: "UAegean EWC Verifier", + logo_uri: "https://studyingreece.edu.gr/wp-content/uploads/2023/03/25.png", + location: "Greece", + cover_uri: "string", + description: "EWC pilot case verification", + }, client_id: clientId, client_id_scheme: "redirect_uri", response_uri: response_uri,