Skip to content

Commit 4b962cc

Browse files
Andrew-Chen-Wangauvipy
authored andcommitted
Add docs about TOKEN_USER_CLASS
1 parent 91fbce3 commit 4b962cc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/settings.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Some of Simple JWT's behavior can be customized through settings variables in
3737
3838
'AUTH_TOKEN_CLASSES': ('rest_framework_simplejwt.tokens.AccessToken',),
3939
'TOKEN_TYPE_CLAIM': 'token_type',
40+
'TOKEN_USER_CLASS': 'rest_framework_simplejwt.models.TokenUser',
4041
4142
'JTI_CLAIM': 'jti',
4243
@@ -235,6 +236,14 @@ identifier is used to identify revoked tokens in the blacklist app. It may be
235236
necessary in some cases to use another claim besides the default "jti" claim to
236237
store such a value.
237238

239+
``TOKEN_USER_CLASS``
240+
--------------------
241+
242+
A stateless user object which is backed by a validated token. Used only for
243+
the experimental JWTTokenUserAuthentication authentication backend. The value
244+
is a dotted path to your subclass of ``rest_framework_simplejwt.models.TokenUser``,
245+
which also is the default.
246+
238247
``SLIDING_TOKEN_LIFETIME``
239248
--------------------------
240249

0 commit comments

Comments
 (0)