From 9a872ea156fe1f984afbd7a84f98ffaa7543d0e4 Mon Sep 17 00:00:00 2001 From: haburger Date: Fri, 22 Nov 2024 10:29:47 +0000 Subject: [PATCH] new configuration version --- .../nevis/k8s-nevisauth-7022472ae407577ae604bbb8.yaml | 2 +- .../opt/nevisauth/default/conf/askMobileNumber.groovy | 11 ++++++++++- .../auth/var/opt/nevisauth/default/conf/esauth4.xml | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/etc/nevis/k8s-nevisauth-7022472ae407577ae604bbb8.yaml b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/etc/nevis/k8s-nevisauth-7022472ae407577ae604bbb8.yaml index 8d27498..ab2e209 100644 --- a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/etc/nevis/k8s-nevisauth-7022472ae407577ae604bbb8.yaml +++ b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/etc/nevis/k8s-nevisauth-7022472ae407577ae604bbb8.yaml @@ -45,7 +45,7 @@ spec: podDisruptionBudget: maxUnavailable: "50%" git: - tag: "r-a688715771af9b47fe1a2e89b9f650a668556a4d" + tag: "r-531df4d70374c7edf2c8bd2dc66243ffcf866911" dir: "DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth" credentials: "git-credentials" keystores: diff --git a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/askMobileNumber.groovy b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/askMobileNumber.groovy index 7e13c7e..ed8cf96 100644 --- a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/askMobileNumber.groovy +++ b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/askMobileNumber.groovy @@ -23,12 +23,21 @@ String clientExtId = session.get('ch.adnovum.nevisidm.user.clientExtId') String userExtId = session.get('ch.adnovum.nevisidm.user.extId') String mobile = session.get('ch.nevis.idm.User.mobile') +String baseUrl = parameters.get('baseUrl') +String endPoint = "${baseUrl}/core/v1/${clientExtId}/users/${userExtId}" + + if (mobile) { response.setResult('done') return } if (inargs['submit'] && inargs['mobile']) { - // TODO: save the mobile number to IDM + String result + try { + result = idmRestClient.patch(endPoint, "{\"contacts\":{\"mobile\": \"${inargs[mobile]?.trim()}\"},\"added mobile number from user during request ${requestId}\":\"\"}") + } catch(Exception e) { + LOG.warn(e) + } response.setResult('done') return } diff --git a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/esauth4.xml b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/esauth4.xml index c334aaa..4139482 100644 --- a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/esauth4.xml +++ b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/esauth4.xml @@ -880,6 +880,8 @@ + +