From 07825da278c5154bd80f6deb716d1ad5a703a50e Mon Sep 17 00:00:00 2001 From: "herman-joel.tatani-boutchueng@capgemini.com" <herman-joel.tatani-boutchueng@capgemini.com> Date: Fri, 21 Oct 2022 16:36:21 +0000 Subject: [PATCH] BIOMASS-2784 : update url token in notebook --- init.sh | 2 +- scalability-s2-jupyter/Notebook_Classification_S2.ipynb | 2 +- wps_notebook/Resample.ipynb | 2 +- wps_notebook/Scalability_Demonstration.ipynb | 2 +- wps_notebook/Scalability_aksk_biopal_fh.ipynb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/init.sh b/init.sh index f41e11b..01be444 100755 --- a/init.sh +++ b/init.sh @@ -13,7 +13,7 @@ echo "user_id = $3" >> $HOME/.maap/auth.ini touch $HOME/.maap/maap.ini echo "[maap]" > $HOME/.maap/maap.ini echo "copa_backend_url = https://gravitee-gateway.${MAAP_ENV_TYPE,,}.esa-maap.org/" >> $HOME/.maap/maap.ini -echo "url_token = https://iam.${MAAP_ENV_TYPE,,}.esa-maap.org/oxauth/restv1/token" >> $HOME/.maap/maap.ini +echo "url_token = https://auth.${MAAP_ENV_TYPE,,}.esa-maap.org/${$REALM_NAME}/maap/protocol/openid-connect/token" >> $HOME/.maap/maap.ini echo "client_id = $CLIENT_ID" >> $HOME/.maap/maap.ini echo "url_gravitee_s3 = https://gravitee-gateway.${MAAP_ENV_TYPE,,}.esa-maap.org/s3/" >> $HOME/.maap/maap.ini diff --git a/scalability-s2-jupyter/Notebook_Classification_S2.ipynb b/scalability-s2-jupyter/Notebook_Classification_S2.ipynb index 3062cb7..a1182ac 100644 --- a/scalability-s2-jupyter/Notebook_Classification_S2.ipynb +++ b/scalability-s2-jupyter/Notebook_Classification_S2.ipynb @@ -73,7 +73,7 @@ "outputs": [], "source": [ "#retrieve a token\n", - "response = requests.post(url_token, data={'client_id': CLIENT_ID, 'username': email, 'password': password, \"grant_type\": \"password\", \"scope\": \"openid+profile\"})\n", + "response = requests.post(url_token, data={'client_id': CLIENT_ID, 'username': email, 'password': password, \"grant_type\": \"password\", \"scope\": \"profile\"})\n", "#Convert the string to json to fecth access_token\n", "data = json.loads(response.text)\n", "token = data['access_token']\n", diff --git a/wps_notebook/Resample.ipynb b/wps_notebook/Resample.ipynb index e112b3b..5b912f6 100644 --- a/wps_notebook/Resample.ipynb +++ b/wps_notebook/Resample.ipynb @@ -85,7 +85,7 @@ "metadata": {}, "outputs": [], "source": [ - "response = requests.post(url_token, data={'client_id': CLIENT_ID, 'username': email, 'password': password, \"grant_type\": \"password\", \"scope\": \"openid+profile\"})\n", + "response = requests.post(url_token, data=data={'client_id': CLIENT_ID, 'username': email, 'password': password, \"grant_type\": \"password\", \"scope\": \"profile\"})\n", "data = json.loads(response.text)\n", "print(data)\n", "oauth_token = data['access_token']" diff --git a/wps_notebook/Scalability_Demonstration.ipynb b/wps_notebook/Scalability_Demonstration.ipynb index bfae151..02621de 100644 --- a/wps_notebook/Scalability_Demonstration.ipynb +++ b/wps_notebook/Scalability_Demonstration.ipynb @@ -56,7 +56,7 @@ "metadata": {}, "outputs": [], "source": [ - "response = requests.post(url_token, data={'client_id': CLIENT_ID, 'username': email, 'password': password, \"grant_type\": \"password\", \"scope\": \"openid+profile\"})\n", + "response = requests.post(url_token, data={'client_id': CLIENT_ID, 'username': email, 'password': password, \"grant_type\": \"password\", \"scope\": \"profile\"})\n", "data = json.loads(response.text)\n", "print(data)\n", "oauth_token = data['access_token']" diff --git a/wps_notebook/Scalability_aksk_biopal_fh.ipynb b/wps_notebook/Scalability_aksk_biopal_fh.ipynb index a8b690f..fb67ca2 100644 --- a/wps_notebook/Scalability_aksk_biopal_fh.ipynb +++ b/wps_notebook/Scalability_aksk_biopal_fh.ipynb @@ -56,7 +56,7 @@ "metadata": {}, "outputs": [], "source": [ - "response = requests.post(url_token, data={'client_id': CLIENT_ID, 'username': email, 'password': password, \"grant_type\": \"password\", \"scope\": \"openid+profile\"})\n", + "response = requests.post(url_token, data={'client_id': CLIENT_ID, 'username': email, 'password': password, \"grant_type\": \"password\", \"scope\": \"profile\"})\n", "data = json.loads(response.text)\n", "print(data)\n", "oauth_token = data['access_token']" -- GitLab