change structure of permissions output

This commit is contained in:
2025-06-02 15:26:49 +03:30
parent 0e4076e876
commit d1549a97b6
5 changed files with 47 additions and 37 deletions

View File

@@ -2,6 +2,8 @@ from rest_framework_simplejwt.tokens import AccessToken
def get_token_jti(token_str):
""" get generated jwt id (jti) for every token """
try:
token = AccessToken(token_str)
return token['jti'], token['user_id']