working on manual logout: block access token

This commit is contained in:
2025-06-02 12:18:13 +03:30
parent 8a2b2ce905
commit 0e4076e876
11 changed files with 152 additions and 42 deletions

View File

@@ -0,0 +1,9 @@
from rest_framework_simplejwt.tokens import AccessToken
def get_token_jti(token_str):
try:
token = AccessToken(token_str)
return token['jti'], token['user_id']
except Exception as e:
return None, None