diff --git a/src/fts3rest/fts3rest/config/config.py b/src/fts3rest/fts3rest/config/config.py index 5228aa29da71ce5e0c9640b18994df5aa5588c0a..64dcaebb85cb555a3d708eab0bec20a727bc341d 100644 --- a/src/fts3rest/fts3rest/config/config.py +++ b/src/fts3rest/fts3rest/config/config.py @@ -105,8 +105,9 @@ def fts3_config_load(path="/etc/fts3/ftsrestconfig", test=False): if "_" not in option: provider_name = option provider_url = parser.get("providers", provider_name) - if not provider_url.endswith("/"): + if test and not provider_url.endswith("/"): provider_url += "/" + fts3cfg["fts3.Providers"][provider_url] = {} client_id = parser.get("providers", option + "_ClientId") fts3cfg["fts3.Providers"][provider_url]["client_id"] = client_id diff --git a/src/fts3rest/fts3rest/lib/openidconnect.py b/src/fts3rest/fts3rest/lib/openidconnect.py index 1024e6ef8b31cdd7aceacd610115993392ae9ab1..cd83466edd0f204b57a0c61dfcdc0cf91ee8dc37 100644 --- a/src/fts3rest/fts3rest/lib/openidconnect.py +++ b/src/fts3rest/fts3rest/lib/openidconnect.py @@ -42,7 +42,8 @@ class OIDCmanager: client_secret=providers_config[provider]["client_secret"], ) client.store_registration_info(client_reg) - self.clients[provider] = client + issuer = client.provider_info["issuer"] + self.clients[issuer] = client def _retrieve_clients_keys(self): for provider in self.clients: