@@ -34,6 +34,14 @@ Some of Simple JWT's behavior can be customized through settings variables in
3434 " JWK_URL" : None ,
3535 " LEEWAY" : 0 ,
3636
37+ " SJWT_CACHE_NAME" : " default" ,
38+ " CACHE_BLACKLISTED_REFRESH_TOKENS" : False ,
39+ " CACHE_BLACKLISTED_FAMILIES" : False ,
40+ " CACHE_TTL_BLACKLISTED_REFRESH_TOKENS" : 3600 , # time is seconds
41+ " CACHE_TTL_BLACKLISTED_FAMILIES" : 3600 , # time in seconds
42+ " CACHE_KEY_PREFIX_BLACKLISTED_REFRESH_TOKENS" : " sjwt_brt" ,
43+ " CACHE_KEY_PREFIX_BLACKLISTED_FAMILIES" : " sjwt_btf" ,
44+
3745 " AUTH_HEADER_TYPES" : (" Bearer" ,),
3846 " AUTH_HEADER_NAME" : " HTTP_AUTHORIZATION" ,
3947 " USER_ID_FIELD" : " id" ,
@@ -224,6 +232,47 @@ integer for seconds or a ``datetime.timedelta``. Please reference
224232https://pyjwt.readthedocs.io/en/latest/usage.html#expiration-time-claim-exp
225233for more information.
226234
235+ ``SJWT_CACHE_NAME ``
236+ ---------------------
237+
238+ Specifies the Django cache alias to use. This must match a defined entry
239+ in Django's ``CACHES `` setting.
240+
241+ Learn more about :doc: `/cache_support `.
242+
243+ ``CACHE_BLACKLISTED_REFRESH_TOKENS ``
244+ --------------------------------------
245+
246+ When set to ``True ``, enables caching of blacklisted refresh tokens.
247+ Blacklisted refresh token entries will be cached for a period defined
248+ by ``CACHE_TTL_BLACKLISTED_REFRESH_TOKENS ``.
249+
250+ ``CACHE_BLACKLISTED_FAMILIES ``
251+ --------------------------------
252+
253+ When set to ``True ``, enables caching of blacklisted token families.
254+ Blacklisted family entries will be cached for a period defined
255+ by ``CACHE_TTL_BLACKLISTED_FAMILIES ``.
256+
257+ ``CACHE_TTL_BLACKLISTED_REFRESH_TOKENS ``
258+ ------------------------------------------
259+
260+ Time-to-live (TTL) in seconds for cached refresh token blacklist entries.
261+
262+ ``CACHE_TTL_BLACKLISTED_FAMILIES ``
263+ ------------------------------------
264+
265+ Time-to-live (TTL) in seconds for cached token family blacklist entries.
266+
267+ ``CACHE_KEY_PREFIX_BLACKLISTED_REFRESH_TOKENS ``
268+ -------------------------------------------------
269+
270+ Prefix used for cache keys when storing blacklisted refresh tokens.
271+
272+ ``CACHE_KEY_PREFIX_BLACKLISTED_FAMILIES ``
273+ -------------------------------------------
274+
275+ Prefix used for cache keys when storing blacklisted token families.
227276
228277``AUTH_HEADER_TYPES ``
229278---------------------
0 commit comments