feat(client): surface all accepted DCQL claim values via requested_values - #629
feat(client): surface all accepted DCQL claim values via requested_values#629rubenhensen wants to merge 1 commit into
Conversation
|
Thanks for the PR! I'm reviewing #629 now — checking the new |
There was a problem hiding this comment.
Looks good — approving.
Additive, backwards-compatible change: RequestedValue keeps duplicating the first accepted value while the new requested_values (omitempty) carries the full verifier-ordered list. Verified:
- All three population sites are correct. In both DCQL handlers the loop builds
RequestedValuesfrom the string entries ofclaim.Values, andRequestedValueis derived from the first element — no shared-pointer or loop-variable aliasing issues (each&sis a fresh per-iteration variable, andqueryAttributescopiesfirstto a local before taking its address). client/schemaless.gobuilds the one-element list from the single IRMA required value, giving frontends one canonical field across protocols.- No struct
==/!=comparisons, so the Go pointer-equality trap doesn't apply. - Tests cover both the obtainable (
irma_sdjwt_dcql) and unobtainable (eudi_sdjwt_dcql) paths, asserting order preservation and therequested_valueduplication. Closes #625is correctly formatted and targetsmaster, so it will auto-close on merge.
|
Reviewed and approved! I checked the population sites in |
What
clientmodels.AttributegainsRequestedValues []AttributeValue(
requested_values,omitempty) carrying all values the verifier acceptsfor an attribute, in the verifier's order. Previously only the first entry of
a DCQL claim's
valuesarray reached the frontend via the singlerequested_valuefield.OpenID4VP DCQL (section 6) lets a verifier accept several values for one
claim, of which the holder must disclose one. The wallet locks its embedded
obtain flows to the verifier-requested values (privacybydesign/irmamobile#583)
and offers a choice when several are accepted — which needs the full list.
Closes #625.
How
requested_valuekeeps duplicating the first accepted value, so existingfrontends are unaffected (documented on both fields).
irma_sdjwt_dcql.buildCredentialDescriptor— OpenID4VP DCQL obtainabledescriptors (the flow behind the wallet's obtain-during-disclosure).
eudi_sdjwt_dcql.queryAttributes— unobtainable descriptors for genericEUDI credentials, which previously surfaced no requested values at all;
the user now sees which values the verifier asked for.
client.createCredentialDescriptor— classic-IRMA issuance-during-disclosure bundles. The IRMA protocol allows a single required value, so
this is a one-element list; populating it means frontends can read one
canonical field regardless of the session protocol.
and is unchanged.
Tests
irma_sdjwt_dcql: new case inTestDcqlCandidateSelection— anunsatisfiable query with two accepted values yields an obtainable
descriptor carrying both values in order, with
requested_valueduplicating the first.
eudi_sdjwt_dcql:TestComposeUnobtainableDescriptor_ValueConstraints—same assertions for the generic EUDI unobtainable descriptor.
go build ./...passes,go testpasses for./irma/...,./client/...,./common/...and./eudi/openid4vp/..., andgofmt/go vetare clean.