Skip to content
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

request_uri_post request format using application/json #344

Open
peppelinux opened this issue Nov 25, 2024 · 0 comments
Open

request_uri_post request format using application/json #344

peppelinux opened this issue Nov 25, 2024 · 0 comments

Comments

@peppelinux
Copy link
Member

In the current specs we have the following non normative example

POST /request HTTP/1.1
Host: client.example.org
Content-Type: application/x-www-form-urlencoded

  wallet_metadata=%7B%22vp_formats_supported%22%3A%7B%22jwt_vc_json%22%3A%7B%22alg_values_supported
  %22%3A%5B%22ES256K%22%2C%22ES384%22%5D%7D%2C%22jwt_vp_json%22%3A%7B%22alg_values_supported%22%3A%
  5B%22ES256K%22%2C%22EdDSA%22%5D%7D%7D%7D&
  wallet_nonce=qPmxiNFCR3QTm19POc8u

This is compliant to the following sentence, we have in the Section 5.11. Request URI Method post

The request MUST use the HTTP POST method with the https scheme, and the content type application/x-www-form-urlencoded 

Is there any pratical reason to not use application/json and then have the following solution?

POST /request HTTP/1.1
Host: client.example.org
Content-Type: application/json

{
  "wallet_metadata" : {"vp_formats_supported":{"jwt_vc_json":{"alg_values_supported":["ES256K","ES384"]},"jwt_vp_json":{"alg_values_supported":["ES256K","EdDSA"]}}},
  "wallet_nonce": "qPmxiNFCR3QTm19POc8u"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants