new configuration version

This commit is contained in:
haburger 2024-08-20 09:11:00 +00:00
parent 9a9fab1bef
commit 8c35dcea34
3 changed files with 8 additions and 6 deletions

View File

@ -40,7 +40,7 @@ spec:
podDisruptionBudget: podDisruptionBudget:
maxUnavailable: "50%" maxUnavailable: "50%"
git: git:
tag: "r-7364b51af024a93080fe9a7cafbd0f9121c88904" tag: "r-95871349e8265b00ad7b2829249e4f29cab5d6ab"
dir: "DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth" dir: "DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth"
credentials: "git-credentials" credentials: "git-credentials"
keystores: keystores:

View File

@ -9,9 +9,9 @@ try {
def jsonSlurper = new JsonSlurper() def jsonSlurper = new JsonSlurper()
def httpClient = HttpClients.create(parameters) def httpClient = HttpClients.create(parameters)
def httpResponse = Http.get().url(url).build().send(httpClient) def httpResponse = Http.get().url(url).build().send(httpClient)
LOG.info('Response Message: ' + httpResponse.reasonPhrase()) LOG.debug('Response Message: ' + httpResponse.reasonPhrase())
LOG.info('Response Status Code: ' + httpResponse.code()) LOG.debug('Response Status Code: ' + httpResponse.code())
LOG.info('Response: ' + httpResponse.bodyAsString()) LOG.debug('Response: ' + httpResponse.bodyAsString())
if (httpResponse.code() == 200) { if (httpResponse.code() == 200) {
def json = jsonSlurper.parseText(httpResponse.bodyAsString()) def json = jsonSlurper.parseText(httpResponse.bodyAsString())

View File

@ -1,12 +1,14 @@
def url = parameters.get('url') def url = parameters.get('url')
def email = inargs['userInputValue_prompt.email'] def email = inargs['userInputValue_prompt.email']
def token = inargs['captcha_response']?: 'MISSING'
def ip = request.getLoginContext()['connection.HttpHeader.X-Real-IP'] ?: 'unknown' def ip = request.getLoginContext()['connection.HttpHeader.X-Real-IP'] ?: 'unknown'
def userAgent = request.getLoginContext()['connection.HttpHeader.user-agent'] ?: request.getLoginContext()['connection.HttpHeader.User-Agent'] ?: 'unknown' def userAgent = request.getLoginContext()['connection.HttpHeader.user-agent'] ?: request.getLoginContext()['connection.HttpHeader.User-Agent'] ?: 'unknown'
def payload = "{ \"userIp\": \"${ip}\", \"email\": \"${email}\", \"userAgent\": \"${userAgent}\" }" def payload = "{ \"userIp\": \"${ip}\", \"email\": \"${email}\", \"userAgent\": \"${userAgent}\" }"
LOG.debug('Token: ' + inargs['recaptcha_response']) LOG.debug('Token: ' + token)
LOG.debug('Payload: ' + payload) LOG.debug('Payload: ' + payload)
try { try {
@ -15,7 +17,7 @@ try {
def httpResponse = Http.post() def httpResponse = Http.post()
.url(url) .url(url)
.header("Accept", "application/json") .header("Accept", "application/json")
.header("X-FriendlyCAPTCHA-Token", inargs['recaptcha_response']) .header("X-FriendlyCAPTCHA-Token", token)
.entity(Http.entity() .entity(Http.entity()
.content(payload) .content(payload)
.contentType("application/json") .contentType("application/json")