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.exceptions import APIException
from django.utils.translation import gettext_lazy as _
from rest_framework import status
class TokenBlackListedException(APIException):
status_code = status.HTTP_401_UNAUTHORIZED
default_detail = _('unauthorized')
default_code = 'unauthorized'