From be1656c37fe5c4d72bbc4e1c23617730a32f7a1a Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 4 Jul 2024 20:55:00 +0400 Subject: [PATCH] test connection params --- selfprivacy_api/graphql/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/selfprivacy_api/graphql/__init__.py b/selfprivacy_api/graphql/__init__.py index 6124a1a..b3d1134 100644 --- a/selfprivacy_api/graphql/__init__.py +++ b/selfprivacy_api/graphql/__init__.py @@ -17,5 +17,10 @@ class IsAuthenticated(BasePermission): if token is None: token = info.context["request"].query_params.get("token") if token is None: + connection_params = info.context.get("connection_params") + print("Printing connection params from the ws connect!") + print(connection_params) + token = connection_params.get("Authorization") + if token in None: return False return is_token_valid(token.replace("Bearer ", ""))