Skip to content

Sort headers when serializing to allow for headless JWT. - #136

Merged
zejn merged 3 commits into
mpdavis:masterfrom
zejn:deterministic-headers
Apr 10, 2019
Merged

Sort headers when serializing to allow for headless JWT.#136
zejn merged 3 commits into
mpdavis:masterfrom
zejn:deterministic-headers

Conversation

@zejn

@zejnzejn commented Apr 9, 2019

Copy link
Copy Markdown
Collaborator

Headers are usually small so this should not significantly impact
performance. Testing both equality between two serialized values (fails
on 3.6+ only) and equality with expected serialized JSON, which fails on pre 3.6
too.

This fixes#80 and is a less intrusive change than #81.

Headers are usually small so this should not significantly impact
performance. Testing both equality between two serialized values (fails
on 3.6+ only) and equality with expected serialized JSON, which fails on pre 3.6
too.
@codecov

codecovBot commented Apr 9, 2019

Copy link
Copy Markdown

Codecov Report

Merging #136 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@## master #136 +/- ##
=======================================
Coverage 96.52% 96.52% =======================================
Files 14 14 Lines 1065 1065 =======================================
Hits 1028 1028 Misses 37 37
Impacted FilesCoverage Δ
jose/jws.py96.63% <ø> (ø)⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03707b1...6927cf8. Read the comment docs.

@codecov

codecovBot commented Apr 9, 2019

Copy link
Copy Markdown

Codecov Report

Merging #136 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@## master #136 +/- ##
=======================================
Coverage 96.54% 96.54% =======================================
Files 14 14 Lines 1071 1071 =======================================
Hits 1034 1034 Misses 37 37
Impacted FilesCoverage Δ
jose/jws.py96.72% <ø> (ø)⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aac4c32...bdccde7. Read the comment docs.

@zejn

zejn commented Apr 10, 2019

Copy link
Copy Markdown
CollaboratorAuthor

Merging.

@zejn
zejn merged commit 8b863e8 into mpdavis:masterApr 10, 2019
@zejnzejn mentioned this pull request Apr 10, 2019
Sign up for freeto 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.

Use OrderedDict for headers in jwt.decode and jws._encode_header

2 participants

@zejn@delajozate