aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/oauth2
diff options
context:
space:
mode:
authorJohn Nduli2024-08-07 09:32:16 +0300
committerAlexander_Kabui2024-08-28 15:02:46 +0300
commit960de55dd1f835bb11887647243c2c65c27f7d08 (patch)
treee7593f1b5cca84984dccf84f2630b30e4741c659 /gn2/wqflask/oauth2
parent73a1883f2a7c7623e85ca95862abdb3c0beb7a3e (diff)
downloadgenenetwork2-960de55dd1f835bb11887647243c2c65c27f7d08.tar.gz
chore: remove passing bearer token to end user
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r--gn2/wqflask/oauth2/ui.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/gn2/wqflask/oauth2/ui.py b/gn2/wqflask/oauth2/ui.py
index 89739fe3..04095420 100644
--- a/gn2/wqflask/oauth2/ui.py
+++ b/gn2/wqflask/oauth2/ui.py
@@ -1,11 +1,7 @@
"""UI utilities"""
-from flask import session, render_template
-
-from gn2.wqflask.oauth2 import session
+from flask import render_template
from .client import oauth2_get
-from .client import user_logged_in
-from .request_utils import process_error
def render_ui(templatepath: str, **kwargs):
"""Handle repetitive UI rendering stuff."""
@@ -15,8 +11,7 @@ def render_ui(templatepath: str, **kwargs):
lambda _err: roles, lambda auth_roles: auth_roles)
user_privileges = tuple(
privilege["privilege_id"] for role in roles for privilege in role["privileges"])
- user_token = session.user_token().either(lambda _err: "", lambda token: token["access_token"])
kwargs = {
- **kwargs, "roles": roles, "user_privileges": user_privileges, "bearer_token": user_token
+ **kwargs, "roles": roles, "user_privileges": user_privileges,
}
return render_template(templatepath, **kwargs)