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:
maxUnavailable: "50%"
git:
tag: "r-7364b51af024a93080fe9a7cafbd0f9121c88904"
tag: "r-95871349e8265b00ad7b2829249e4f29cab5d6ab"
dir: "DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth"
credentials: "git-credentials"
keystores:

View File

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

View File

@ -1,12 +1,14 @@
def url = parameters.get('url')
def email = inargs['userInputValue_prompt.email']
def token = inargs['captcha_response']?: 'MISSING'
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 payload = "{ \"userIp\": \"${ip}\", \"email\": \"${email}\", \"userAgent\": \"${userAgent}\" }"
LOG.debug('Token: ' + inargs['recaptcha_response'])
LOG.debug('Token: ' + token)
LOG.debug('Payload: ' + payload)
try {
@ -15,7 +17,7 @@ try {
def httpResponse = Http.post()
.url(url)
.header("Accept", "application/json")
.header("X-FriendlyCAPTCHA-Token", inargs['recaptcha_response'])
.header("X-FriendlyCAPTCHA-Token", token)
.entity(Http.entity()
.content(payload)
.contentType("application/json")