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

Commit 39cb197

Browse files
committed
Allow setting audience
1 parent 84f4157 commit 39cb197

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

rest_framework_jwt/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
'JWT_REFRESH_EXPIRATION_DELTA': datetime.timedelta(days=7),
3434

3535
'JWT_AUTH_HEADER_PREFIX': 'JWT',
36+
37+
'JWT_AUDIENCE': None,
3638
}
3739

3840
# List of settings that may be in string import notation.

rest_framework_jwt/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def jwt_decode_handler(token):
5252
api_settings.JWT_SECRET_KEY,
5353
api_settings.JWT_VERIFY,
5454
verify_expiration=api_settings.JWT_VERIFY_EXPIRATION,
55-
leeway=api_settings.JWT_LEEWAY
55+
leeway=api_settings.JWT_LEEWAY,
56+
audience=api_settings.JWT_AUDIENCE
5657
)
5758

5859

0 commit comments

Comments
 (0)