Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OID demo mDL example #35

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading