Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support decoding and encoding DEFLATE-encoded JWT bodies #666

Closed
wants to merge 3 commits into from

Conversation

Roguelazer
Copy link

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.

@tahnok
Copy link

tahnok commented Oct 16, 2021

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

Copy link
Collaborator

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can add this

@auvipy
Copy link
Collaborator

auvipy commented Oct 16, 2021

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

@tahnok
Copy link

tahnok commented Oct 16, 2021

I added some tests in this commit tahnok@5d15874 if you want to pull it into your branch @Roguelazer

@akx
Copy link
Contributor

akx commented Mar 30, 2022

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.

@jpadilla
Copy link
Owner

Closing this one for now, same reason as #753.

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.

None yet

5 participants