-
-
Notifications
You must be signed in to change notification settings - Fork 466
fix: audience should support sequence too #4241
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4241 +/- ##
=======================================
Coverage 98.24% 98.24%
=======================================
Files 344 344
Lines 15889 15890 +1
Branches 1755 1755
=======================================
+ Hits 15610 15611 +1
Misses 139 139
Partials 140 140 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/4241 |
Hi! Is there any chance that this would be merged soon? Our team is currently experiencing an issue with the |
Hello @casabre , thanks for the PR! Could you please add a test case so we can go ahead and merge it? |
@pytest.mark.parametrize("token_audience", [None, "627224198b4245ed91cf8353e4ccdf1650728c7ee92748f55fe1e9a9c4d961df"]) | ||
@pytest.mark.parametrize( | ||
"token_unique_jwt_id", [None, "10f5c6967783ddd6bb0c4e8262d7097caeae64705e45f83275e3c32eee5d30f2"] | ||
"algorithm", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doubles the amount of tests run, due to the multiple parametrize
decorators. Could you maybe just add one simple case for the sequence audience?
…arameter from test_token
@Harshal6927 @provinzkraut I added an own test for audience validation. Hope that works for you. |
…sequence for audience" This reverts commit 256ac46.
@provinzkraut I didn't change the imports but now pytest is complaining about a missing |
@provinzkraut In the end, a missing import makes the pytests fail
|
Well it's because you are using |
Yes, you right 😅. But I was relying on the correctness of previous logic --> because litestar/litestar/security/jwt/token.py Line 116 in 65b0bd2
It's not a problem for me to pull the collections import out of the type checking guard, but I am really wondering how it was working before 🤔 |
The function signature is not validated during runtime. The dataclass itself is. |
@provinzkraut Yes, I understand that but why was it failing now but before not, when Sequence was accessed too. Anyway... let't move ahead --> if you are satisfied with the change, can you just approve it 😊. |
Description
Adding Sequence support for audience in JWT Token.
Closes
#4240