From a301acae0b0c9b81fbf688fb74a6c23774841300 Mon Sep 17 00:00:00 2001 From: John Readey Date: Sat, 14 Dec 2024 16:36:50 -0600 Subject: [PATCH] fix for updated keycloak openid-connect path --- h5pyd/_apps/config.py | 4 ++++ h5pyd/_hl/openid.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/h5pyd/_apps/config.py b/h5pyd/_apps/config.py index 8c88d77..77b5c9d 100755 --- a/h5pyd/_apps/config.py +++ b/h5pyd/_apps/config.py @@ -141,6 +141,10 @@ def __init__(self, config_file=None, custom_entries=[], **kwargs): continue k = fields[0].strip() v = fields[1].strip() + words = v.split() + if len(words) > 1 and words[1].startswith("#"): + # ignore any inline comment + v = words[0] if k not in self._names: raise ValueError(f"undefined option: {k}") if k in self._choices: diff --git a/h5pyd/_hl/openid.py b/h5pyd/_hl/openid.py index 022f8a5..aae0a08 100644 --- a/h5pyd/_hl/openid.py +++ b/h5pyd/_hl/openid.py @@ -380,7 +380,7 @@ def _getKeycloakUrl(self): raise KeyError("keycloak client_id not set") url = self.config['keycloak_uri'] - url += "/auth/realms/" + url += "/realms/" url += self.config['keycloak_realm'] url += "/protocol/openid-connect/token"