diff --git a/package.json b/package.json index 00a8866..e5bab1b 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://6d7f-2a02-587-870b-2f00-d697-1738-3249-fb5f.ngrok-free.app node server.js" + "dev": "SERVER_URL=https://0324-195-251-179-70.ngrok-free.app node server.js" }, "author": "", "license": "ISC", diff --git a/routes/routes.js b/routes/routes.js index c676277..5848472 100644 --- a/routes/routes.js +++ b/routes/routes.js @@ -225,6 +225,11 @@ router.post("/credential", async (req, res) => { issued: new Date(Math.floor(Date.now() / 1000) * 1000).toISOString(), issuer: serverURL, type: ["PID"], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://europa.eu/2018/credentials/eudi/pid/v1", + ], + issuer: serverURL, validFrom: new Date( Math.floor(Date.now() / 1000) * 1000 ).toISOString(), @@ -324,6 +329,11 @@ router.post("/credential", async (req, res) => { }, }, type: ["ePassportCredential"], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemas.prod.digitalcredentials.iata.org/contexts/iata_credential.jsonld", + ], + issuer: serverURL, validFrom: new Date( Math.floor(Date.now() / 1000) * 1000 ).toISOString(), @@ -342,6 +352,8 @@ router.post("/credential", async (req, res) => { jti: "urn:did:1904a925-38bd-4eda-b682-4b5e3ca9d4bc", vc: { type: ["EducationalID"], + "@context": ["https://www.w3.org/2018/credentials/v1"], + issuer: serverURL, credentialSubject: { id: decodedHeaderSubjectDID || "", identifier: "john.doe@university.edu", @@ -388,6 +400,8 @@ router.post("/credential", async (req, res) => { jti: "urn:did:1904a925-38bd-4eda-b682-4b5e3ca9d4bc", vc: { type: ["allianceIDCredential"], + "@context": ["https://www.w3.org/2018/credentials/v1"], + issuer: serverURL, credentialSubject: { id: decodedHeaderSubjectDID, // Replace with the actual subject DID identifier: {