@@ -53,6 +53,10 @@ Some of Simple JWT's behavior can be customized through settings variables in
5353 " TOKEN_BLACKLIST_SERIALIZER" : " rest_framework_simplejwt.serializers.TokenBlacklistSerializer" ,
5454 " SLIDING_TOKEN_OBTAIN_SERIALIZER" : " rest_framework_simplejwt.serializers.TokenObtainSlidingSerializer" ,
5555 " SLIDING_TOKEN_REFRESH_SERIALIZER" : " rest_framework_simplejwt.serializers.TokenRefreshSlidingSerializer" ,
56+
57+ " CHECK_REVOKE_TOKEN" : False ,
58+ " REVOKE_TOKEN_CLAIM" : " hash_password" ,
59+ " CHECK_USER_IS_ACTIVE" : True ,
5660 }
5761
5862 Above, the default values for these settings are shown.
@@ -175,6 +179,12 @@ integer for seconds or a ``datetime.timedelta``. Please reference
175179https://pyjwt.readthedocs.io/en/latest/usage.html#expiration-time-claim-exp
176180for more information.
177181
182+ ``JSON_ENCODER ``
183+ ----------------
184+
185+ A custom JSON encoder class to use when encoding JWT tokens. When set to
186+ ``None ``, the default JSON encoder is used. This is useful if you need to
187+ serialize non-standard types in your token claims.
178188
179189``AUTH_HEADER_TYPES ``
180190---------------------
@@ -303,3 +313,52 @@ payload of the JWT token.
303313The claim name that is used to store a user hash password.
304314If the value of this CHECK_REVOKE_TOKEN field is ``True ``, this field will be
305315included in the JWT payload.
316+
317+ ``CHECK_USER_IS_ACTIVE ``
318+ ------------------------
319+
320+ When set to ``True `` (the default), the authentication will check if the user's
321+ ``is_active `` flag is ``True ``. If the user is inactive (``is_active=False ``),
322+ authentication will fail with a 401 status code. Set this to ``False `` if you
323+ want to allow inactive users to authenticate with valid tokens.
324+
325+ This setting affects both token authentication via ``JWTAuthentication `` and
326+ the login validation via ``USER_AUTHENTICATION_RULE ``.
327+
328+ ``TOKEN_OBTAIN_SERIALIZER ``
329+ ---------------------------
330+
331+ A dot path to the serializer class used by ``TokenObtainPairView ``.
332+ This can be customized to include additional claims or modify the
333+ token generation logic.
334+
335+ ``TOKEN_REFRESH_SERIALIZER ``
336+ ----------------------------
337+
338+ A dot path to the serializer class used by ``TokenRefreshView ``.
339+ Customize this to modify refresh token handling behavior.
340+
341+ ``TOKEN_VERIFY_SERIALIZER ``
342+ ---------------------------
343+
344+ A dot path to the serializer class used by ``TokenVerifyView ``.
345+ Customize this to modify token verification behavior.
346+
347+ ``TOKEN_BLACKLIST_SERIALIZER ``
348+ ------------------------------
349+
350+ A dot path to the serializer class used by ``TokenBlacklistView ``.
351+ Requires the ``rest_framework_simplejwt.token_blacklist `` app to be
352+ installed.
353+
354+ ``SLIDING_TOKEN_OBTAIN_SERIALIZER ``
355+ -----------------------------------
356+
357+ A dot path to the serializer class used by ``TokenObtainSlidingView ``.
358+ For use with sliding tokens feature.
359+
360+ ``SLIDING_TOKEN_REFRESH_SERIALIZER ``
361+ ------------------------------------
362+
363+ A dot path to the serializer class used by ``TokenRefreshSlidingView ``.
364+ For use with sliding tokens feature.
0 commit comments