Skip to content

Commit a181e17

Browse files
authored
Remove algorithm requirement for JWT API (#975)
1 parent e318e94 commit a181e17

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Changed
1111
~~~~~~~
1212

1313
- Use ``Sequence`` for parameter types rather than ``List`` where applicable by @imnotjames in `#970 <https://github.com/jpadilla/pyjwt/pull/970>`__
14+
- Remove algorithm requirement from JWT API, instead relying on JWS API for enforcement, by @luhn in `#975 <https://github.com/jpadilla/pyjwt/pull/975>`__
1415

1516
Fixed
1617
~~~~~

jwt/api_jwt.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,6 @@ def decode_complete(
144144
options.setdefault("verify_aud", False)
145145
options.setdefault("verify_iss", False)
146146

147-
if options["verify_signature"] and not algorithms:
148-
raise DecodeError(
149-
'It is required that you pass in a value for the "algorithms" argument when calling decode().'
150-
)
151-
152147
decoded = api_jws.decode_complete(
153148
jwt,
154149
key=key,

0 commit comments

Comments
 (0)