diff options
author | Frederick Muriuki Muriithi | 2024-03-05 08:09:49 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-03-05 08:09:49 +0300 |
commit | b295624bcb6109bc2ca252f94dfe658e395e2c59 (patch) | |
tree | d355859aa0361b4028761d8b8fa97436ded10cba /gn2/wqflask/oauth2 | |
parent | 9983b4273622dc5fd8b7d43d10d935f07e3c9eb6 (diff) | |
download | genenetwork2-b295624bcb6109bc2ca252f94dfe658e395e2c59.tar.gz |
Fix missed bug: Don't use `gn2.utility.tools` for configs.
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r-- | gn2/wqflask/oauth2/checks.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gn2/wqflask/oauth2/checks.py b/gn2/wqflask/oauth2/checks.py index 5d90f986..1d355ed8 100644 --- a/gn2/wqflask/oauth2/checks.py +++ b/gn2/wqflask/oauth2/checks.py @@ -7,6 +7,7 @@ from flask import ( flash, request, url_for, redirect, current_app, session as flask_session) from . import session +from .client import authserver_uri, oauth2_clientid, oauth2_clientsecret def user_logged_in(): """Check whether the user has logged in.""" @@ -32,10 +33,8 @@ def require_oauth2(func): return redirect("/") def __with_token__(token): - from gn2.utility.tools import ( - AUTH_SERVER_URL, OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET) client = OAuth2Session( - OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, token=token) + oauth2_clientid(), oauth2_clientsecret(), token=token) resp = client.get( urljoin(AUTH_SERVER_URL, "auth/user/")) user_details = resp.json() |