jpadilla / pyjwt

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

Why not sort_keys during json.dump ? #919

Closed joshgc closed 10 months ago

joshgc commented 1 year 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 1 year 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 10 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