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

chore(deps): bump pyjwt[crypto] from 2.8.0 to 2.9.0 #16378

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions requirements/main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1717,9 +1717,9 @@ pygments==2.18.0 \
# via
# readme-renderer
# rich
pyjwt[crypto]==2.8.0 \
--hash=sha256:57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de \
--hash=sha256:59127c392cc44c2da5bb3192169a91f429924e17aff6534d70fdc02ab3e04320
pyjwt[crypto]==2.9.0 \
--hash=sha256:3b02fb0f44517787776cf48f2ae25d8e14f300e6d7545a4315cee571a415e850 \
--hash=sha256:7e1e5b56cc735432a7369cbfa0efe50fa113ebecdc04ae6922deba8b84582d0c
# via
# -r requirements/main.in
# pyjwt
Expand Down
7 changes: 3 additions & 4 deletions tests/unit/oidc/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,15 +972,14 @@ def test_decodes_token_jwk_roundtrip(self):

assert decoded == {"foo": "bar"}

def test_decodes_token_typeerror_on_pyjwk(self):
def test_decodes_token_pyjwk(self):
privkey_jwk = PyJWK.from_json(algorithms.RSAAlgorithm.to_jwk(self._privkey))
pubkey_jwk = PyJWK.from_json(algorithms.RSAAlgorithm.to_jwk(self._pubkey))

token = jwt.encode({"foo": "bar"}, privkey_jwk.key, algorithm="RS256")
decoded = jwt.decode(token, pubkey_jwk, algorithms=["RS256"])

# Passing a `PyJWK` directly into `jwt.decode` does not work.
with pytest.raises(TypeError, match=r"Expecting a PEM-formatted key\."):
jwt.decode(token, pubkey_jwk, algorithms=["RS256"])
assert decoded == {"foo": "bar"}

def test_decode_strict_aud(self):
token = jwt.encode(
Expand Down