Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTiz authored and julien hadim committed Nov 7, 2020
1 parent 362ad17 commit e8d38ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework_simplejwt/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ def verify(self):
# claim. We don't want any zombie tokens walking around.
self.check_exp()

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

Expand Down

0 comments on commit e8d38ec

Please sign in to comment.