demo · v141

Selective Disclosure

Build a Presentation Definition by ticking exactly which mDoc fields a relying party needs — and watch the request payload update live. The wallet user sees this same list before consenting. Anything you don't ask for, the verifier never sees.

Heads up Requires chrome://flags/#web-identity-digital-credentials. On unsupported platforms the request still serialises so you can see what gets sent — the picker just won't open. Under eIDAS / EUDI rules, requesting more than necessary is a regulator-facing concern, so the spec deliberately requires per-field intent.
checking support…

build your presentation definition

mDoc namespace org.iso.18013.5.1 (mDL).

live request payload

the call

const constraints = {
  limit_disclosure: "required",   // wallet MUST omit unrequested fields
  fields: selectedFields.map((path) => ({
    path: [`$['org.iso.18013.5.1']['${path}']`],
    intent_to_retain: false,      // verifier promises not to persist
  })),
};
const dcr = await navigator.credentials.get({
  mediation: "required",
  digital: { requests: [{ protocol: "openid4vp", data: { /* ...definition... */ } }] },
});

why this angle

The mDL spec separates essential claims (always present) from optional derived claims a verifier may request. A bar checking age over 21 has no business knowing the holder's address; a delivery service needs given/family name but not portrait. The Digital Credentials API surfaces this granularity through Presentation Exchange definitions, and the browser shows the user which fields the relying party requested before consent. Sliders here let you feel the trade-off in real time.

see also