aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-01-31 04:00:36 +0300
committerFrederick Muriuki Muriithi2023-01-31 04:00:36 +0300
commit5eb884453ba41776d91712e97ec8b8e4b6d4599b (patch)
tree5884b0ab761ab5c9e00bd2229df23f98c2aa4364 /wqflask
parent294aac4c2463a266f4b71e98a9c71b518b387a50 (diff)
downloadgenenetwork2-5eb884453ba41776d91712e97ec8b8e4b6d4599b.tar.gz
oauth2: remove obsolete function.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/oauth2/client.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/wqflask/wqflask/oauth2/client.py b/wqflask/wqflask/oauth2/client.py
index b28265f7..2bf3f94d 100644
--- a/wqflask/wqflask/oauth2/client.py
+++ b/wqflask/wqflask/oauth2/client.py
@@ -15,27 +15,6 @@ def oauth2_client():
scope=SCOPE, token_endpoint_auth_method="client_secret_post",
token=session.get("oauth2_token"))
-def get_endpoint(uri_path: str) -> Maybe:
- token = session.get("oauth2_token", False)
- if token and not bool(session.get("user_details", False)):
- config = app.config
- client = OAuth2Session(
- config["OAUTH2_CLIENT_ID"], config["OAUTH2_CLIENT_SECRET"],
- token=token)
- resp = client.get(
- urljoin(config["GN_SERVER_URL"], uri_path))
- resp_json = resp.json()
-
- if resp_json.get("error") == "invalid_token":
- flash(resp_json["error_description"], "alert-danger")
- flash("You are now logged out.", "alert-info")
- session.pop("oauth2_token", None)
- return Nothing
-
- return Just(resp_json)
-
- return Nothing
-
def oauth2_get(uri_path: str) -> Either:
token = session.get("oauth2_token")
config = app.config