Verify ISO 18013-5 Mobile Driving License as mDoc
A Mobile Driving Licence (mDL) is the digital, phone-based equivalent of a physical driver’s license, carrying the holder’s identity and driving privilege data. When verifying one you can request only the attributes you need — for example just an age check or the driving privileges. The credential follows the ISO/IEC 18013-5 standard, which defines the mDL doctype org.iso.18013.5.1.mDL and the mdoc presentation format used here.
This page provides a presentation template payload for verifying mDL credentials.
Creating verifier root X509 certificate
Before you can create the presentation template for mDL verification, you need to set up a verifier root x509 certificate with a P-256 key.
The certificates guide contains detailed guidance on creating a certificate. We recommend creating your initial certificate through the dashboard.
Alternatively, if your verifier certificate needs to be signed by an external certificate authority, you can create a certificate signing request and import the externally signed certificate into Paradym.
Setting up a trusted entity
To control which issuers you accept mDL credentials from, you need to create one or multiple trusted entities configured with the trusted root X.509 certificates used for issuance of the credential. Without a trusted entity linked, the presentation template will accept any issuer.
- If you issued the credential yourself, you can find the issuer root certificate (
issuerRoot) in the Paradym dashboard, under the My Certificates section of the “Trust” tab. If you don’t have one yet, see Creating a Root Certificate. - If the issuer is external, you must obtain the root certificate used for issuance from the issuer, and add it to the trusted entity. If you’re unsure where to find it, ask the issuer of the credential.
Once you have the root certificate, create a trusted entity with it. Note the id of the created trusted entity, as you’ll need it to link the trusted entity to the presentation template below.
Creating the presentation template
We recommend creating this template through the API, as it allows you to exactly copy the payload as defined below. You can also select this as a pre-made template in the dashboard. See the API reference for Create presentation template for more information.
The trustedIssuers array below links the trusted entity you created to this credential, so that only credentials issued by that trusted entity are accepted. Replace <TRUSTED_ENTITY_ID> with the id of the trusted entity you created.
{
"name": "Verify Mobile Driving License",
"description": "This information is requested to verify your driving license",
"verifier": {
"signer": "certificate",
"keyType": "P-256"
},
"credentials": [
{
"name": "Mobile Driving Licence",
"description": "mDL compliant with ISO/IEC 18013-5 standard",
"format": "mdoc",
"type": "org.iso.18013.5.1.mDL",
"trustedIssuers": [
"<TRUSTED_ENTITY_ID>"
],
"attributes": {
"org.iso.18013.5.1": {
"properties": {
"family_name": {},
"given_name": {},
"birth_date": {},
"issue_date": {},
"expiry_date": {},
"issuing_country": {},
"issuing_authority": {},
"document_number": {},
"portrait": {},
"driving_privileges": {},
"un_distinguishing_sign": {},
"administrative_number": {},
"sex": {},
"height": {},
"weight": {},
"eye_colour": {},
"hair_colour": {},
"birth_place": {},
"resident_address": {},
"portrait_capture_date": {},
"age_in_years": {},
"age_birth_year": {},
"age_over_16": {},
"age_over_18": {},
"age_over_21": {},
"age_over_25": {},
"age_over_65": {},
"nationality": {},
"resident_city": {},
"resident_state": {},
"resident_postal_code": {},
"resident_country": {},
"biometric_template_face": {},
"biometric_template_finger": {},
"biometric_template_iris": {},
"biometric_template_signature_sign": {},
"family_name_national_character": {},
"given_name_national_character": {},
"signature_usual_mark": {}
}
}
}
}
]
}Credential template
If you want to issue mDL credentials before verifying them, refer to the mDL credential template for the credential template setup.