We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7776294 commit a5c3073Copy full SHA for a5c3073
caching/private_api/decorators.py
@@ -5,6 +5,7 @@
5
from rest_framework.response import Response
6
7
from caching.private_api.management import CacheManagement, CacheMissError
8
+from metrics.api.django_cognito_jwt import backend
9
10
11
class CacheCheckResultedInMissError(Exception): ...
@@ -72,10 +73,8 @@ def wrapped_view(*args, **kwargs) -> Response:
72
73
74
75
def _check_if_valid_non_public_request(request):
- try:
76
- is_authenticated = request.auth()
77
- except TypeError:
78
- is_authenticated = False
+ auth = backend.JSONWebTokenAuthentication()
+ is_authenticated = auth.authenticate(request)
79
80
return is_authenticated
81
0 commit comments