From a71fe424607d1ea01426050c20ce5f26c41058f9 Mon Sep 17 00:00:00 2001 From: Rafael Sarmiento Date: Wed, 11 Sep 2024 10:50:04 +0200 Subject: [PATCH] print kc response --- chart/f7t4jhub/files/jupyterhub-config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chart/f7t4jhub/files/jupyterhub-config.py b/chart/f7t4jhub/files/jupyterhub-config.py index 82d0cf9..443751e 100644 --- a/chart/f7t4jhub/files/jupyterhub-config.py +++ b/chart/f7t4jhub/files/jupyterhub-config.py @@ -80,7 +80,10 @@ async def refresh_user(self, user, handler=None): } response = requests.post(self.token_url, data=params, headers=headers) - self.log.debug(f"[refresh_user] Request to KeyCloak: {response} {response.json()}") + if response.status_code != 200: + self.log.debug(f"[refresh_user] Request to KeyCloak: {response.json()}") + return False + token_response = response.json() auth_state['token_response'].update(token_response)