You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The simple JWT document says we can customize token claims from TokenObtainPairSerializer -> get_token class method.
However, if we customize the token according to the above document and enable the blacklist app, the token stored in the OutstandingToken model is different. Because the BlacklistMixin -> for_user is executed before modifying the token.
If the tokens are different, it will be difficult in identifying the token while blacklisting.
To be more specific: it would be very bad if the JTI claim is changed after the for_user method has been called since that claim is used to identify tokens
The simple JWT document says we can customize token claims from
TokenObtainPairSerializer
->get_token
class method.However, if we customize the token according to the above document and enable the blacklist app, the token stored in the
OutstandingToken
model is different. Because theBlacklistMixin
->for_user
is executed before modifying the token.If the tokens are different, it will be difficult in identifying the token while blacklisting.
Reference:
djangorestframework-simplejwt/rest_framework_simplejwt/tokens.py
Lines 278 to 284 in aa077a4
The text was updated successfully, but these errors were encountered: