From 5ba9e626d3c09cb0906d4a76249d013b990dd105 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Mon, 15 Jan 2024 13:43:55 +0100 Subject: [PATCH] More debug --- jupyter/base/values/values.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jupyter/base/values/values.yaml b/jupyter/base/values/values.yaml index 8acd5b8..4161e94 100644 --- a/jupyter/base/values/values.yaml +++ b/jupyter/base/values/values.yaml @@ -17,6 +17,7 @@ hub: from oauthenticator.generic import GenericOAuthenticator def get_nextcloud_access_token(refresh_token): + debug = 'NEXTCLOUD_DEBUG_OAUTH' in os.environ client_id = os.environ['NEXTCLOUD_CLIENT_ID'] client_secret = os.environ['NEXTCLOUD_CLIENT_SECRET'] @@ -30,6 +31,8 @@ hub: 'client_secret': client_secret } response = requests.post(url, data=data) + if debug: + print(response.text) return response.json() def post_auth_hook(authenticator, handler, authentication): @@ -103,7 +106,7 @@ hub: c.NextcloudOAuthenticator.allow_all = True c.NextcloudOAuthenticator.refresh_pre_spawn = True c.NextcloudOAuthenticator.enable_auth_state = True - c.NextcloudOAuthenticator.auth_refresh_age = 3600 + c.NextcloudOAuthenticator.auth_refresh_age = 60 c.NextcloudOAuthenticator.post_auth_hook = post_auth_hook extraEnv: