From b3cb8a07cbcd5a67e00461fa7c954307e19474cd Mon Sep 17 00:00:00 2001 From: Ace Archer Date: Tue, 12 Jul 2022 08:07:43 +0000 Subject: [PATCH] Update cps/ub.py, cps/admin.py, cps/templates/config_edit.html --- cps/admin.py | 2 +- cps/templates/config_edit.html | 6 +++--- cps/ub.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index 618d35b6..b95f0329 100755 --- a/cps/admin.py +++ b/cps/admin.py @@ -1120,7 +1120,7 @@ def _configuration_oauth_helper(to_save): "oauth_base_url": to_save["config_" + str(element['id']) + "_oauth_base_url"], "oauth_auth_url": to_save["config_" + str(element['id']) + "_oauth_auth_url"], "oauth_token_url": to_save["config_" + str(element['id']) + "_oauth_token_url"], - "oauth_userinfo_url": to_save["config_" + str(element['id']) + "oauth_userinfo_url"], + "oauth_userinfo_url": to_save["config_" + str(element['id']) + "_oauth_userinfo_url"], "username_mapper": to_save["config_" + str(element['id']) + "_username_mapper"], "email_mapper": to_save["config_" + str(element['id']) + "_email_mapper"], "login_button": to_save["config_" + str(element['id']) + "_login_button"], diff --git a/cps/templates/config_edit.html b/cps/templates/config_edit.html index 570f02d6..c9803f81 100644 --- a/cps/templates/config_edit.html +++ b/cps/templates/config_edit.html @@ -331,10 +331,10 @@ {% endif %} - {% if 'oauth_userid_url' in prov %} + {% if 'oauth_userinfo_url' in prov %}
- - + +
{% endif %} {% if 'username_mapper' in prov %} diff --git a/cps/ub.py b/cps/ub.py index bbc3e3d2..9f4b1819 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -260,10 +260,10 @@ class OAuthProvider(Base): provider_name = Column(String) oauth_client_id = Column(String) oauth_client_secret = Column(String) + oauth_userinfo_url = Column(String, default="/protocol/openid-connect/userinfo") oauth_base_url = Column(String) oauth_auth_url = Column(String, default="/protocol/openid-connect/auth") oauth_token_url = Column(String, default="/protocol/openid-connect/token") - oauth_userid_url = Column(String, default="/application/o/userinfo/") scope = Column(String, default="openid profile email") username_mapper = Column(String, default="preferred_username") email_mapper = Column(String, default="email")