mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 20:11:30 +00:00
test
This commit is contained in:
parent
be1656c37f
commit
66a2bc8a0c
|
@ -13,6 +13,9 @@ class IsAuthenticated(BasePermission):
|
||||||
message = "You must be authenticated to access this resource."
|
message = "You must be authenticated to access this resource."
|
||||||
|
|
||||||
def has_permission(self, source: typing.Any, info: Info, **kwargs) -> bool:
|
def has_permission(self, source: typing.Any, info: Info, **kwargs) -> bool:
|
||||||
|
connection_params = info.context.get("connection_params")
|
||||||
|
print("Printing connection params from the ws connect!")
|
||||||
|
print(connection_params)
|
||||||
token = info.context["request"].headers.get("Authorization")
|
token = info.context["request"].headers.get("Authorization")
|
||||||
if token is None:
|
if token is None:
|
||||||
token = info.context["request"].query_params.get("token")
|
token = info.context["request"].query_params.get("token")
|
||||||
|
|
Loading…
Reference in a new issue