From a2cfd4dbc48969dc438ebd1ced5cb5096513fdd4 Mon Sep 17 00:00:00 2001 From: Wiktor Przybylski Date: Sat, 16 Mar 2024 18:13:31 +0100 Subject: [PATCH] token settings tweaking, debug off --- auth/backend.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/auth/backend.py b/auth/backend.py index 5cf3bbf..2865354 100644 --- a/auth/backend.py +++ b/auth/backend.py @@ -9,7 +9,7 @@ class HSWawOAuth2(BaseOAuth2): ID_KEY = "username" AUTHORIZATION_URL = "https://auth.apps.hskrk.pl/application/o/authorize/" ACCESS_TOKEN_URL = "https://auth.apps.hskrk.pl/application/o/token/" - DEFAULT_SCOPE = ["profile:read"] + DEFAULT_SCOPE = ["openid","profile","email"] ACCESS_TOKEN_METHOD = 'POST' REQUEST_TOKEN_METHOD = 'POST' REDIRECT_STATE = False @@ -32,9 +32,9 @@ def user_data(self, access_token, *args, **kwargs): """Loads user data from service""" url = "https://auth.apps.hskrk.pl/application/o/userinfo/" headers = {"Authorization": "Bearer {}".format(access_token)} - print(url) - print(headers) - print(access_token) + # print(url) + # print(headers) + # print(access_token) return self.get_json(url, headers=headers) def auth_url(self): """Return redirect url"""