Skip to content

docs: document the encode sort_headers option - #1242

Open
Luxe7 wants to merge 3 commits into
jpadilla:masterfrom
Luxe7:docs/sort-headers
Open

Luxe7 wants to merge 3 commits into
jpadilla:masterfrom
Luxe7:docs/sort-headers

Conversation

@Luxe7

@Luxe7 Luxe7 commented Oct 26, 2026

Copy link
Copy Markdown

jwt.encode already accepts sort_headers, but the API reference leaves it out of both the signature and parameter descriptions.

This documents the default, how to disable sorting, and that it only affects the JOSE header, not the payload. Runtime behavior is unchanged.

Checked on Python 3.14: 472 tests passed, 4 skipped, the Sphinx build passed with warnings treated as errors, and Ruff passed for the changed module. Also checked both header orders, unchanged payload order, and signature verification for both settings.

Luxe7 added 3 commits October 26, 2026 13:56
Expose the existing parameter in the API reference.
Document the default and distinguish header ordering from payload ordering.
Add the required unreleased changelog entry.

This branch has not been deployed

No deployments
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.

1 participant