fix: VPResponse.VPToken as map[string][]string per OID4VP DCQL spec#5
Merged
Merged
Conversation
OID4VP 1.0 §8.1 requires vp_token values to be arrays of presentations. The previous map[string]string type caused json.Unmarshal to silently drop array values from spec-compliant wallets, resulting in 'VP Token not found' errors. - Change VPToken from map[string]string to map[string][]string - Update API gateway handler to unwrap first token from array - Update verifier handler with same unwrap logic - Update tests to use new type Fixes SUNET#365
s-jairl
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per OID4VP §6.3 with DCQL,
vp_tokenvalues are arrays of Verifiable Presentations keyed by credential query ID. The previousmap[string]stringtype causedjson.Unmarshalto fail when a spec-compliant wallet sends array values, resulting in errors likefailed to unmarshal decrypted JWE.Changes
VPTokenfrommap[string]stringtomap[string][]stringinVPResponseNotes
Rebased version of SUNET#386 targeting
release/sirosid/v0.5.0.Fixes SUNET#365