support decoding and encoding DEFLATE-encoded JWT bodies#666
support decoding and encoding DEFLATE-encoded JWT bodies#666Roguelazer wants to merge 3 commits intojpadilla:masterfrom
Conversation
|
I'd also volunteer to help write some tests. I am also looking at decoding the data in an SHC encoded JWT and at the moment pyjwt cannot be used for this Overall, change looks solid and straightforward |
you are welcome to do so |
|
I added some tests in this commit tahnok@5d15874 if you want to pull it into your branch @Roguelazer |
|
Hmm – I'd be a little wary against adding a non-spec feature like this. In fact, the golang library PR @Roguelazer merged was actually not merged due to the same concern: dgrijalva/jwt-go#102 (comment) I think the better approach would be to refactor payload decoding (lines 98..104 in the preimage) to a separate function that can be easily augmented in a subclass. |
|
Closing this one for now, same reason as #753. |
These are used in the Smart Health Card framework that several regions (including California and Quebec) are using for COVID-19 proofs of vaccination, and are supported by some other JWT libraries, such as jwt-go.
If y'all like this approach, I'm glad to write tests. I could also see putting this logic in
api_jws.py.