From 17c13c67711420eef52a1c1a3cec3209d0776c55 Mon Sep 17 00:00:00 2001 From: Lubos Matl Date: Tue, 19 Jan 2021 21:38:42 +0100 Subject: [PATCH] Updated auth token library --- chamber/multidomains/auth/middleware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chamber/multidomains/auth/middleware.py b/chamber/multidomains/auth/middleware.py index 40858a9..b7de2c7 100644 --- a/chamber/multidomains/auth/middleware.py +++ b/chamber/multidomains/auth/middleware.py @@ -3,7 +3,7 @@ from auth_token import utils # pylint: disable=E0401 from auth_token.config import settings as auth_token_settings # pylint: disable=E0401 from auth_token.middleware import TokenAuthenticationMiddleware, get_user # pylint: disable=E0401 -from auth_token.models import Token # pylint: disable=E0401 +from auth_token.models import AuthorizationToken # pylint: disable=E0401 from auth_token.utils import dont_enforce_csrf_checks, header_name_to_django # pylint: disable=E0401 from chamber.config import settings @@ -18,7 +18,7 @@ def get_token(request): if (not request.META.get(header_name_to_django(auth_token_settings.HEADER_NAME)) and settings.MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME): ovetaker_auth_token = request.COOKIES.get(settings.MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME) - token = get_object_or_none(Token, key=ovetaker_auth_token, is_active=True) + token = get_object_or_none(AuthorizationToken, key=ovetaker_auth_token, is_active=True) if utils.get_user_from_token(token).is_authenticated: return token