-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Current Limitations
DCQL Support
There is currently support for presentation requests based on the older OID4VP drafts that used Presentation Exchange (presentation_definition with input_descriptors) but from later drafts onward (Draft 26), the spec removes PEX and introduces DCQL queries which are not currently supported.
Updated Path Syntax
Additionally, only PEX-style JSONPath path values are supported today.
Example: (Draft 20 syntax)
"path": ["$['org.iso.18013.5.1']['family_name']"]
Internally, prepareDigest() enforces this format using regex:
const [[_1, nameSpace], [_2, elementIdentifier]] = [...path.matchAll(/\['(.*?)'\]/g)];
However, newer OID4VP drafts have moved away from JSONPath and now define path as a direct ordered list of keys:
Example: Latest OpenID4VP v1.0 syntax
"path": ["org.iso.18013.5.1", "first_name"]
This path syntax fails with current parsing during digest preparation
Proposed Solution
-
Add DCQL query support alongside existing Presentation Definition support:
- New
usingDcqlQuery() - Extend
sign()to processdcql_query.credentialsas well
- New
-
Extend namespace preparation to work for both:
constraints.fields(Presentation Definition)claims(DCQL)
-
Update
pathresolution (prepareDigest) to support two formats:- Legacy JSONPath string (
"$['org.iso.18013.5.1']['family_name']") - New array form (
["org.iso.18013.5.1", "family_name"])
- Legacy JSONPath string (
-
Add DCQL tests using sample queries
I’m happy to submit a PR addressing this, if you think the proposed approach makes sense.