Skip to content

Fix spec examples: 401 with Bearer challenge, DCQL type_values, Client Identifier Prefix names - #52

Open
frostevent wants to merge 3 commits into
mainfrom
jeremie/spec-examples
Open

frostevent wants to merge 3 commits into
mainfrom
jeremie/spec-examples

Conversation

@frostevent

@frostevent frostevent commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

  • 401 examples carry WWW-Authenticate: Bearer. RFC 9110 §15.5.2 requires a challenge on every 401. The four examples keep 401 Unauthorized and add a Bearer challenge, which the Agent can satisfy with a Verification Token from the oauth token exchange leg. Status Code Independence gains one sentence: a Verifier that returns 401 SHOULD include a WWW-Authenticate challenge, as RFC 9110 requires, and SHOULD include the oauth member. The <data> carrier sentence no longer says "non-401".
  • type_values is an array of string arrays. OpenID4VP 1.0 Appendix B.1 for jwt_vc_json: "REQUIRED. A non-empty array of string arrays." Both examples now read [["FinancialCustomerCredential"]].
  • Client Identifier Prefix names. OpenID4VP 1.0 defines decentralized_identifier: and openid_federation:; did: and https: were draft names.

🤖 Generated with Claude Code

…efix names

RFC 9110 requires a WWW-Authenticate challenge on every 401, and x401
defines none, so the examples use 403. OpenID4VP 1.0 defines type_values
for jwt_vc_json as an array of string arrays, and names the prefixes
decentralized_identifier: and openid_federation:.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@frostevent
frostevent requested a review from a team as a code owner November 19, 2026 14:42
@frostevent
frostevent enabled auto-merge (squash) November 19, 2026 14:50

@dan-proof dan-proof left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this may be a case of something we might be comfortable leaving, even if the pedantic nature of 401 use doesn't technically align. To have all examples be 403 just because one detail of an RFC that no one really turns their code on exists seems like it may add more confusion than it does clarity.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Deploying x401 with  Cloudflare Pages  Cloudflare Pages

Latest commit: a763f14
Status: ✅  Deploy successful!
Preview URL: https://2bc65f28.x401.pages.dev
Branch Preview URL: https://jeremie-spec-examples.x401.pages.dev

View logs

@frostevent

Copy link
Copy Markdown
Collaborator Author

@dan-proof I agree I'd rather leave 401 too. What if we returned 401 with a WWW-Authenticate: Bearer header indicating that the user must provide an OAuth token, which the user can get in exchange of a PROOF-RESULT, assuming the example PROOF-REQUEST header contains the optional oauth member?

@dan-proof

Copy link
Copy Markdown
Contributor

@frostevent I think it is fine to modify the language to strongly encourage compliance, but the reality is that adherence to the presence of WWW-Authenticate in the wild is spotty, and it's not the end of the world. I think most companies will use OAuth token exchange, so that can certainly be the SHOULD primary implementation/example the spec articulates.

@frostevent frostevent closed this Dec 1, 2026
auto-merge was automatically disabled December 1, 2026 10:47

Pull request was closed

@frostevent frostevent reopened this Dec 1, 2026
@frostevent frostevent changed the title Fix spec examples: 403 status, DCQL type_values, Client Identifier Prefix names Fix spec examples: 401 with Bearer challenge, DCQL type_values, Client Identifier Prefix names Dec 1, 2026
@frostevent

Copy link
Copy Markdown
Collaborator Author

@frostevent I think it is fine to modify the language to strongly encourage compliance, but the reality is that adherence to the presence of WWW-Authenticate in the wild is spotty, and it's not the end of the world. I think most companies will use OAuth token exchange, so that can certainly be the SHOULD primary implementation/example the spec articulates.

Ok, updated, a left a SHOULD recommendation.

@frostevent
frostevent enabled auto-merge (squash) December 1, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants