From 520574f9ee9b44f3287e7dbb57f196f6b3c1281e Mon Sep 17 00:00:00 2001 From: Thomas Kluyver <thomas.kluyver@xfel.eu> Date: Tue, 17 May 2022 16:08:24 +0200 Subject: [PATCH] Add use_oauth2 option to allow using proxy without oauth --- notebooks/LPD/LPD_Correct_Fast.ipynb | 1 + src/cal_tools/restful_config.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/notebooks/LPD/LPD_Correct_Fast.ipynb b/notebooks/LPD/LPD_Correct_Fast.ipynb index bbd744301..ae3433b3c 100644 --- a/notebooks/LPD/LPD_Correct_Fast.ipynb +++ b/notebooks/LPD/LPD_Correct_Fast.ipynb @@ -205,6 +205,7 @@ "# Connect to CalCat.\n", "calcat_config = restful_config['calcat']\n", "client = CalibrationClient(\n", + " use_oauth2=calcat_config['use-oauth2'],\n", " client_id=calcat_config['user-id'],\n", " client_secret=calcat_config['user-secret'],\n", " user_email=calcat_config['user-email'],\n", diff --git a/src/cal_tools/restful_config.yaml b/src/cal_tools/restful_config.yaml index 813d1467d..21b9546e1 100644 --- a/src/cal_tools/restful_config.yaml +++ b/src/cal_tools/restful_config.yaml @@ -10,6 +10,7 @@ mdc: user-secret: '@note add this to secrets file' calcat: + use-oauth2: true auth-url: https://in.xfel.eu/calibration/oauth/authorize base-api-url: https://in.xfel.eu/calibration/api refresh-url: https://in.xfel.eu/calibration/oauth/token -- GitLab