File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3838# We are going to be using a simple in memory blacklist for this example. In
3939# production, you will likely prefer something like redis (it can work with
4040# multiple threads and processes, and supports automatic removal of expired
41- # tokens so the blacklist doesn't blow up). Check here for available options:
42- # http://pythonhosted.org/simplekv/
41+ # tokens so the blacklist doesn't blow up). Check here for available storage
42+ # options: http://pythonhosted.org/simplekv/
4343blacklist_store = simplekv .memory .DictStore ()
4444app .config ['JWT_BLACKLIST_STORE' ] = blacklist_store
4545
46- # Only check the blacklist for refresh token. Available options are:
46+ # Which tokens to check against the blacklist. Default is 'refresh'. Options are:
4747# 'all': Check blacklist for access and refresh tokens
4848# 'refresh': Check blacklist only for refresh tokens
4949app .config ['JWT_BLACKLIST_TOKEN_CHECKS' ] = 'refresh'
5050
5151jwt = JWTManager (app )
5252
5353
54- # Function to add custom claims to the JWT (optional).
54+ # Function to add your own data ( claims) to the JWT (optional).
5555@jwt .user_claims_loader
5656def my_claims (identity ):
5757 return {
You can’t perform that action at this time.
0 commit comments