Skip to content

Commit

Permalink
Merge pull request #35 from docknetwork/feat/oid-mdl-demo
Browse files Browse the repository at this point in the history
OID demo mDL example
  • Loading branch information
cykoder authored Aug 22, 2024
2 parents 7dc9195 + d81017b commit b43563f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions pages/openid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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."
/>

<OID4VPProofRequest
proofRequestSetupObject={mdlProofRequest}
title="Mobile Drivers License"
desc="Scan this QR code with your OpenID compatible MDL Wallet to present an age over 18 check to the Dock API."
/>
</div>
<div className="mt-10 mb-10">
<Separator />
Expand Down

0 comments on commit b43563f

Please sign in to comment.