-
Notifications
You must be signed in to change notification settings - Fork 35
dcql_query & presentation_definition are not strings #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7136c9a
dcql_query & presentation_definition are not strings
jogu aa83988
Apply Christian's url encoded suggestion
jogu fd6ed68
Apply Daniel's suggestion
jogu 8800ea4
Apply Daniel's suggestion
jogu 898c2fb
Merge branch 'main' into dcql-is-json-object
jogu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -280,16 +280,18 @@ One exception to this rule is `transaction_data` parameter, and the wallets that | |||||
This specification defines the following new request parameters: | ||||||
|
||||||
`presentation_definition`: | ||||||
: A string containing a Presentation Definition JSON object. See (#request_presentation_definition) for more details. | ||||||
: A JSON object containing a Presentation Definition. See (#request_presentation_definition) for more details. | ||||||
|
||||||
`presentation_definition_uri`: | ||||||
: A string containing an HTTPS URL pointing to a resource where a Presentation Definition JSON object can be retrieved. See (#request_presentation_definition_uri) for more details. | ||||||
|
||||||
`dcql_query`: | ||||||
: A string containing a JSON-encoded DCQL query as defined in (#dcql_query). | ||||||
: A JSON object containing a DCQL query as defined in (#dcql_query). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above
Suggested change
|
||||||
|
||||||
Exactly one of the following parameters MUST be present in the Authorization Request: `dcql_query`, `presentation_definition`, `presentation_definition_uri`, or a `scope` value representing a Presentation Definition. | ||||||
|
||||||
In the context of an authorization request according to [RFC6749], parameters containing JSON objects are encoded using the application/x-www-form-urlencoded format of the serialized JSON. | ||||||
jogu marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
`client_metadata`: | ||||||
: OPTIONAL. A JSON object containing the Verifier metadata values. It MUST be UTF-8 encoded. The following metadata parameters MAY be used: | ||||||
|
||||||
|
@@ -2812,6 +2814,7 @@ The technology described in this specification was made available from contribut | |||||
* add language on client ID and nonce binding for ISO mdocs and W3C VCs | ||||||
* clarify the behavior is not to sign when authorization_signed_response_alg is omitted | ||||||
* add a note on the use of apu/apv in the JWE header of encrypted responses | ||||||
* clarify that `dcql_query` and `presentation_definition` are passed as JSON objects (not strings) in request objects | ||||||
|
||||||
-24 | ||||||
|
||||||
|
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this change is helpful. This is not clear enough IMO to convey that the encoding varies between the query string (where it is a JSON-encoded string) and the request object and DC API call (where it is an object and it is not additionally JSON-encoded).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sort of understand this perspective @danielfett, however I'm struggling to see what other interpretation a developer might have about how to convey a JSON object in a query parameter value?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielfett Are we at least agreed the current text is bad? It has resulted in people doing this in request objects:
"dcql_query": "{\"id\":\"ffc717a3-abaf-4ec3-9c55-a9b8e998874c\",\"name\":\"A
So this is hopefully an improvement at least. The way I've done it here (combined with the text below explaining how to put JSON objects into the url query) seems consistent with how it's done in RAR ( https://datatracker.ietf.org/doc/html/rfc9396#section-2 ), and we have the example to try and help people struggling to interpret it too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this is a DC API call, this is an object (not JSON-encoded).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to make that change for that reason I suggest doing it consistently everywhere we use the term 'JSON object' in a separate PR.