From 6d3481217aa5a4e19871439d76a798e2c8993ae8 Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Wed, 14 Aug 2024 21:34:19 -0700 Subject: [PATCH 1/2] Remove algorithm requirement for JWT API. It will rely on JWS API to properly enforce those options. --- jwt/api_jwt.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/jwt/api_jwt.py b/jwt/api_jwt.py index e162623c0..c55f94b9b 100644 --- a/jwt/api_jwt.py +++ b/jwt/api_jwt.py @@ -144,11 +144,6 @@ def decode_complete( options.setdefault("verify_aud", False) options.setdefault("verify_iss", False) - if options["verify_signature"] and not algorithms: - raise DecodeError( - 'It is required that you pass in a value for the "algorithms" argument when calling decode().' - ) - decoded = api_jws.decode_complete( jwt, key=key, From 34957e04b4db9819ecbf879f170b2d723dffc376 Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Mon, 26 Aug 2024 15:18:42 -0700 Subject: [PATCH 2/2] Update CHANGELOG. --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3a22594d3..708269ab2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,7 @@ Changed ~~~~~~~ - Use ``Sequence`` for parameter types rather than ``List`` where applicable by @imnotjames in `#970 `__ +- Remove algorithm requirement from JWT API, instead relying on JWS API for enforcement, by @luhn in `#975 `__ Fixed ~~~~~