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 598d181..a429019 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-c4461bfe63af2bfac8b5b204bdb8b9f66d9e392f" + tag: "r-4caccf4cf0af3ba86274f4d1fd247bb9b65d1ed3" 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 new file mode 100644 index 0000000..2ab32c2 --- /dev/null +++ b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/askMobileNumber.groovy @@ -0,0 +1,37 @@ +import ch.nevis.esauth.auth.engine.AuthResponse +import ch.nevis.idm.client.IdmRestClient +import ch.nevis.idm.client.IdmRestClientFactory +import ch.nevis.idm.client.HTTPRequestWrapper + +import groovy.json.JsonSlurper +import groovy.xml.XmlSlurper + +// Accounting +def requester = session['ch.nevis.auth.saml.request.scoping.requesterId'] ?: 'unknown' +def requestId = session['ch.nevis.auth.saml.request.id'] ?: 'unknown' +def requestedAq = session['agov.requestedRoleLevel'] ?: 'unknown' +def user = session['ch.adnovum.nevisidm.user.extId'] ?: 'unknown' +def credentialType = session['authenticatedWith'] ?: 'unknown' +def sourceIp = request.getLoginContext()['connection.HttpHeader.X-Real-IP'] ?: 'unknown' +def userAgent = request.getLoginContext()['connection.HttpHeader.user-agent'] ?: request.getLoginContext()['connection.HttpHeader.User-Agent'] ?: 'unknown' + + + +IdmRestClient idmRestClient = IdmRestClientFactory.get(parameters) + +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') + +if (mobile) { + response.setResult('done') + return +} +if (inargs['submit'] && inargs['mobile']) { + // TODO: save the mobile number to IDM + response.setResult('done') +} + + +// we should ask the user +response.setStatus(AuthResponse.AUTH_CONTINUE) \ No newline at end of file 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 1c83cef..c334aaa 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 @@ -90,6 +90,11 @@ + + + + + @@ -176,7 +181,7 @@ - + @@ -389,7 +394,7 @@ - + @@ -541,7 +546,7 @@ - + @@ -610,7 +615,7 @@ - + @@ -728,7 +733,7 @@ - + @@ -819,11 +824,11 @@ - + - + @@ -849,7 +854,47 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -870,18 +915,6 @@ - - - - - - - - - - - - @@ -1103,7 +1136,7 @@ - + @@ -1169,7 +1202,7 @@ - + @@ -1254,7 +1287,7 @@ - + @@ -1954,7 +1987,7 @@ - + @@ -1991,7 +2024,7 @@ - +