Commit aff5175
committed
Remove token last used field in the token store
This would be a nice feature to have, but it can lead lead to (very
rare) race conditions. simplekv has no way to support atomic retreive
and replace. We could revoke a key after grabbing the key to update,
then overwrite the revoke status. This also makes storing an effecient
mapping of jtis that exist to an identity hard.
Currently, I'm thinking if a user wants this, they should add it as part
of their application logic, something like
@app.route('foobar')
@jwt_refresh_token_required
def refresh:
udate_token_last_used(jti) # Need a way for users to get the jti
access_token = create_access_token()
return ...1 parent a22114d commit aff5175
2 files changed
+1
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
| |||
159 | 155 | | |
160 | 156 | | |
161 | 157 | | |
162 | | - | |
163 | 158 | | |
164 | 159 | | |
165 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| |||
0 commit comments