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

@@ -1,14 +1,11 @@
from django.utils.deprecation import MiddlewareMixin
from .models import BlacklistedAccessToken
from apps.authentication.tools import get_token_jti
from rest_framework.exceptions import AuthenticationFailed
from apps.authentication.exceptions import TokenBlackListedException
from rest_framework.response import Response
from django.http import JsonResponse
from rest_framework import status
class BlockedTokenMiddleware:
""" Check blocked access token authentication """
def __init__(self, get_response):
self.get_response = get_response