Skip to content

Harden OAuth token request spec compliance#50

Merged
snoble merged 4 commits intodevfrom
pr-49-followups
Mar 3, 2026
Merged

Harden OAuth token request spec compliance#50
snoble merged 4 commits intodevfrom
pr-49-followups

Conversation

@snoble
Copy link
Contributor

@snoble snoble commented Mar 3, 2026

Summary

  • add Content-Type: application/x-www-form-urlencoded assertion to OAuth spec test
  • encode OAuth token request body with URI.encode_www_form per RFC 6749 §4.4.2 / Appendix B
  • add UTF-8 and reserved-character round-trip test for scope and client_id

Notes

  • This branch also includes the previously requested follow-ups: version bump and schema sync.

Made with Cursor

jacksonhuether and others added 4 commits February 25, 2026 17:57
The create_token method sends a form-encoded POST body but does not set
the Content-Type header to application/x-www-form-urlencoded. Some OAuth
servers (including AWS Cognito) return 405 Method Not Allowed when the
header is absent because they cannot identify the request as a valid
form POST.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Updates release version metadata and regenerates fragment.schema.json
using the current schema sync process.

Made-with: Cursor
Extends the OAuth request spec test to verify the token request uses
application/x-www-form-urlencoded content type, aligned with RFC 6749
section 4.4.2 and its example request.

Made-with: Cursor
Build the token request body with URI.encode_www_form to satisfy RFC 6749
section 4.4.2 / Appendix B UTF-8 form encoding requirements. Adds a test
that verifies client_id and scope round-trip with special characters.

Made-with: Cursor
Copy link

@sophiehouser sophiehouser left a comment

Choose a reason for hiding this comment

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

i dont know anything about ruby but yolo approving!

@snoble snoble merged commit 8e48bd2 into dev Mar 3, 2026
6 checks passed
@snoble snoble deleted the pr-49-followups branch March 3, 2026 03:26
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.

3 participants