From 54b2e22bae96c8b5e80917e601a4034ecc980a51 Mon Sep 17 00:00:00 2001 From: Mingfei Shao Date: Fri, 12 Jul 2024 14:31:11 -0500 Subject: [PATCH] more fix to token validation --- wts/blueprints/external_oidc.py | 1 + wts/blueprints/oauth2.py | 1 + wts/resources/oauth2.py | 1 + 3 files changed, 3 insertions(+) diff --git a/wts/blueprints/external_oidc.py b/wts/blueprints/external_oidc.py index 421dbd5..eac2ed0 100644 --- a/wts/blueprints/external_oidc.py +++ b/wts/blueprints/external_oidc.py @@ -64,6 +64,7 @@ def get_external_oidc(): # to know the issuer client = get_oauth_client(idp="default") flask.current_app.config["OIDC_ISSUER"] = client.metadata["api_base_url"].strip("/") + flask.current_app.config["USER_API"] = client.metadata["api_base_url"].rstrip("/") username = None try: user = current_user diff --git a/wts/blueprints/oauth2.py b/wts/blueprints/oauth2.py index d43d311..8aa6afe 100644 --- a/wts/blueprints/oauth2.py +++ b/wts/blueprints/oauth2.py @@ -23,6 +23,7 @@ def connected(): # to know the issuer client = get_oauth_client(idp=requested_idp) flask.current_app.config["OIDC_ISSUER"] = client.metadata["api_base_url"].strip("/") + flask.current_app.config["USER_API"] = client.metadata["api_base_url"].rstrip("/") try: user = current_user diff --git a/wts/resources/oauth2.py b/wts/resources/oauth2.py index 3cd17bb..189ec2b 100644 --- a/wts/resources/oauth2.py +++ b/wts/resources/oauth2.py @@ -88,6 +88,7 @@ def refresh_refresh_token(tokens, idp, username_field): # to know the issuer client = get_oauth_client(idp="default") flask.current_app.config["OIDC_ISSUER"] = client.metadata["api_base_url"].strip("/") + flask.current_app.config["USER_API"] = client.metadata["api_base_url"].rstrip("/") user = current_user username = user.username