refactor: ⚡ performance upgrade - complete rewriting#99
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #99 +/- ##
==========================================
+ Coverage 97.97% 99.49% +1.51%
==========================================
Files 9 10 +1
Lines 1089 993 -96
Branches 132 118 -14
==========================================
- Hits 1067 988 -79
+ Misses 19 0 -19
- Partials 3 5 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Complete revamp of internal code for JWT/JWS/Validation, with mostly no breaking changes. Dramatic speed up for encoding and decoding operations with or without validation running.
JWTandJWSclasses have been removed in favor of pure functional paradigmencode()/decode()are now written injwt.pyas pure functions, same for jws encode and decode functions.JWT,JWS,JWSTokenLifeCycleremovedcryptographyis now used by default for all algorithms and is a mandatory requirement. HMAC now usescryptographyinstead ofhmac.model_dump_json()ValidationConfigis now a simple Python class with no mutability issues. Removed the deep copy from previous logicNoneAlgorithmandNoneKeyset_max_token_bytes()to update the max token bytes size allowed during encoding/decoding operation. Replaces previous low levelJWTinit parameter.'b64'header validation logic, this is not a supported feature