From d81017b0f8a69bc9d8f7b10982ee8e6ac2b6759b Mon Sep 17 00:00:00 2001 From: Sam Hellawell Date: Thu, 22 Aug 2024 11:36:01 +0100 Subject: [PATCH] OID demo mDL example --- pages/openid.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/pages/openid.js b/pages/openid.js index a6a5315..e29002b 100644 --- a/pages/openid.js +++ b/pages/openid.js @@ -147,6 +147,36 @@ const ebsiConformanceProofRequest = { }, }; +const mdlProofRequest = { + name: 'Proof request', + nonce: '1234567890', + request: { + name: 'MDL age over 18 test', + purpose: 'To check if over 18 years old', + input_descriptors: [ + { + name: 'MDL age over 18 test', + purpose: 'To check if over 18 years old', + id: 'org.iso.18013.5.1.mDL', + format: { + mso_mdoc: { + alg: ['EdDSA', 'ES256'], + }, + }, + constraints: { + limit_disclosure: 'required', + fields: [ + { + path: ["$['org.iso.18013.5.1']['age_over_18']", 'age_over_18'], + intent_to_retain: false, + }, + ], + }, + }, + ], + }, +}; + function OID4VPProofRequest({ title, desc, proofRequestSetupObject }) { const [proofRequest, setProofRequest] = useState(); const [isVerified, setIsVerified] = useState(false); @@ -326,6 +356,12 @@ export default function Home() { title="SIOP V2 (Sphereon)" desc="Scan this QR code with your Sphereon Wallet to present a JWT SIOP identity credential to the Dock API." /> + +