Skip to content
This repository was archived by the owner on May 26, 2020. It is now read-only.

Commit 57c63a5

Browse files
committed
Set allowed algorithms when decoding
Note: This feature is new in PyJWT v1.0.0.
1 parent 062bcdc commit 57c63a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest_framework_jwt/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def jwt_decode_handler(token):
5454
verify_expiration=api_settings.JWT_VERIFY_EXPIRATION,
5555
leeway=api_settings.JWT_LEEWAY,
5656
audience=api_settings.JWT_AUDIENCE,
57-
issuer=api_settings.JWT_ISSUER
57+
issuer=api_settings.JWT_ISSUER,
58+
algorithms=[api_settings.JWT_ALGORITHM]
5859
)
5960

6061

0 commit comments

Comments
 (0)