Skip to content

Pin pyjwt & enable invalid subject handling#858

Merged
bennybp merged 1 commit intomainfrom
fix_jwt
Nov 27, 2024
Merged

Pin pyjwt & enable invalid subject handling#858
bennybp merged 1 commit intomainfrom
fix_jwt

Conversation

@bennybp
Copy link
Contributor

@bennybp bennybp commented Nov 27, 2024

Description

An update to pyjwt enforces the standard that subjects of the JWT are strings. We use integers (ids).

So the fix:

  1. Move to using strings (just stringified int)
  2. Add a handler to return that the token is expired if the validation in pyjwt fails with InvalidSubjectError.
  3. That exception only exists in pyjwt 2.10.0 and above, so pin that version.

Only affects servers, not clients. Upgrading a server should be transparent to clients.

Status

  • Code base linted
  • Ready to go

@bennybp bennybp merged commit d9a6cba into main Nov 27, 2024
@bennybp bennybp deleted the fix_jwt branch November 27, 2024 16:30
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.

1 participant