jpadilla / pyjwt

JSON Web Token implementation in Python
https://pyjwt.readthedocs.io
MIT License
4.99k stars 676 forks source link

Why not sort_keys during json.dump ? #919

Closed joshgc closed 5 months ago

joshgc commented 9 months ago

I'm using your library as a super convenient way to verify some HW-backed JWT construction methods. In my tests I assume your implementation is correct and check mine can exactly replicate your signature. Unfortunately you don't sort keys during your json dumps, which I think means your JWTs are not deterministic.

The JWT standard does not require sorted keys, but its also does make testing easier!

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days