Skip to content

Commit

Permalink
more fix to token validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mfshao committed Jul 12, 2024
1 parent 3059701 commit 54b2e22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions wts/blueprints/external_oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions wts/blueprints/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions wts/resources/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 54b2e22

Please sign in to comment.