Avatar
UAB Odifis

Driving licence verification (mDL)

Use case verification

Description:

The rental use case. Verifies an ISO mdoc mobile driving licence (doctype org.iso.18013.5.1.mDL) and returns the holder's name, document number, issuing authority and country, driving privileges, and date of birth — from which the age condition for the rental category is evaluated.

Why the date of birth rather than an age predicate, which would disclose less? Because in ISO 18013-5 only birth_date is a mandatory element: age_over_NN and age_in_years are both optional, and today's reference mDL carries no age_over_NN at all. A predicate request therefore fails against it with "requested document is not available", and DCQL never says which claim was missing. We ask for what every conformant mDL must carry, so that this flow actually completes.

Where an issuer does attest a predicate, we ask for that instead and never the date of birth — see the PID + Age Verification flow.

Two further notes for anyone testing. driving_privileges is requested whole because ISO 18013-5 has no selective disclosure inside an element: asking for it discloses every category the holder holds, not only the one being rented. And neither issue_date nor expiry_date is requested — authenticity and validity come from the cryptographic verdict over the MSO ValidityInfo, so asking for them would cost privacy and prove nothing.

The request is a signed JAR request object with an x509_hash client identifier (HAIP 1.0 §5), served over request_uri (GET and POST), with the response encrypted using direct_post.jwt.

This is the flow PASS2RENT uses to check a driver at booking or pick-up — what we do with it, and the live demo to run it yourself.

QR code:

Processing YAML configuration...

Workflow YAML:

		version: "1.0"
name: "Driving licence verification (mDL)"

env:
  host: "https://api.playground.france-identite.gouv.fr/odifis/eudi-demo"

tests:
  mdl-licence:
    steps:
      - name: "Create presentation request"
        http:
          method: POST
          url: ${{ env.host }}/api/licence/start
          headers:
            content-type: "application/json"
            accept: "application/json, text/plain, */*"
          json:
            minAge: 21
            ageSource: "dob"
            photo: false
          captures:
            deeplink:
              jsonpath: $.deeplink
            qr:
              jsonpath: $.qrDataUrl
            sessionId:
              jsonpath: $.presentationId
		

DCQL Query:

		{
  "credentials": [
    {
      "id": "mdl",
      "format": "mso_mdoc",
      "meta": { "doctype_value": "org.iso.18013.5.1.mDL" },
      "claims": [
        { "path": ["org.iso.18013.5.1", "family_name"] },
        { "path": ["org.iso.18013.5.1", "given_name"] },
        { "path": ["org.iso.18013.5.1", "document_number"] },
        { "path": ["org.iso.18013.5.1", "issuing_authority"] },
        { "path": ["org.iso.18013.5.1", "issuing_country"] },
        { "path": ["org.iso.18013.5.1", "driving_privileges"] },
        { "path": ["org.iso.18013.5.1", "birth_date"] }
      ]
    }
  ]
}
		
enites-esdedapt-brfr