Skip to content

Commit e8d38ec

Browse files
TheTizjulien hadim
authored andcommitted
update comment
1 parent 362ad17 commit e8d38ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework_simplejwt/tokens.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ def verify(self):
9393
# claim. We don't want any zombie tokens walking around.
9494
self.check_exp()
9595

96-
# Ensure token id is present if JTI_CLAIM != None
9796
# According to RFC 7519, the "jti" claim is OPTIONAL
9897
# (https://tools.ietf.org/html/rfc7519#section-4.1.7)
98+
# Ensure token id is present only if JTI_CLAIM_IS_MENDATORY is set to True (default)
9999
if api_settings.JTI_CLAIM_IS_MENDATORY and api_settings.JTI_CLAIM not in self.payload:
100100
raise TokenError(_('Token has no id'))
101101

0 commit comments

Comments
 (0)