working on manual logout: block access token
This commit is contained in:
9
apps/authentication/exceptions.py
Normal file
9
apps/authentication/exceptions.py
Normal 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'
|
||||
Reference in New Issue
Block a user