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

Python jwt upgrade #26

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

carlosjavier84
Copy link

@carlosjavier84 carlosjavier84 commented Apr 9, 2024

Pull Request Description:

This pull request addresses several key aspects related to JWT (JSON Web Token) authentication within the project:

  1. Fixing JWT Authentication Handling: In the jwt_auth/mixins.py file, I've corrected the exception handling for expired signatures. Previously, it was catching jwt.ExpiredSignature, which is incorrect. It should instead catch jwt.ExpiredSignatureError to handle expired signatures properly.

  2. Enhancing JWT Encoding and Decoding: Within the jwt_auth/utils.py file, I've made improvements to the JWT encoding and decoding process. Specifically, I've added an additional parameter verify_signature to the decoding process, which is sourced from the project settings (settings.JWT_VERIFY). This helps in customizing signature verification based on project requirements.

  3. Dependency Update: The requirements.txt file has been updated to ensure compatibility with PyJWT versions. The requirement for PyJWT has been relaxed to allow versions up to 2.5.0 (>=1.4.0,<=2.5.0) to accommodate potential future updates without compromising compatibility.

These changes collectively enhance the security and reliability of JWT authentication within the project while ensuring compatibility with the latest PyJWT versions.

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