From 89d5b3f01c15fe436a63a6eb3f60c2f3fc33ffaa Mon Sep 17 00:00:00 2001 From: Yuriy Movchan Date: Thu, 19 Sep 2024 16:59:03 +0300 Subject: [PATCH] feat(jans-auth): update SG script to conform API Signed-off-by: Yuriy Movchan --- .../SuperGluuExternalAuthenticator.py | 3 +-- .../plugins/docs/lock-plugin-swagger.yaml | 14 +++++++------- .../plugin/lock/model/stat/HealthEntry.java | 4 ++-- .../configapi/plugin/lock/model/stat/LogEntry.java | 4 ++-- .../plugin/lock/model/stat/TelemetryEntry.java | 4 ++-- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/docs/script-catalog/person_authentication/super-gluu-external-authenticator/SuperGluuExternalAuthenticator.py b/docs/script-catalog/person_authentication/super-gluu-external-authenticator/SuperGluuExternalAuthenticator.py index 9df01b6219c..97d3364759e 100644 --- a/docs/script-catalog/person_authentication/super-gluu-external-authenticator/SuperGluuExternalAuthenticator.py +++ b/docs/script-catalog/person_authentication/super-gluu-external-authenticator/SuperGluuExternalAuthenticator.py @@ -1107,8 +1107,7 @@ def getAccessTokenJansServer(self, asBaseUrl, asClientId, asClientSecret): try: httpService = CdiUtil.bean(HttpService2) - httpClient = httpService.getHttpsClient() - resultResponse = httpService.executePost(httpClient, endpointUrl, authData, headers, body, ContentType.APPLICATION_FORM_URLENCODED) + resultResponse = httpService.executePost(endpointUrl, None, headers, body, ContentType.APPLICATION_JSON, None) httpResponse = resultResponse.getHttpResponse() httpResponseStatusCode = httpResponse.getStatusLine().getStatusCode() print "Super-Gluu. Scan. Get token response status code: %s" % httpResponseStatusCode diff --git a/jans-config-api/plugins/docs/lock-plugin-swagger.yaml b/jans-config-api/plugins/docs/lock-plugin-swagger.yaml index b979d70b45f..2d846528f26 100644 --- a/jans-config-api/plugins/docs/lock-plugin-swagger.yaml +++ b/jans-config-api/plugins/docs/lock-plugin-swagger.yaml @@ -483,7 +483,7 @@ components: format: date-time service: type: string - getnodeName: + nodeName: type: string status: type: string @@ -506,7 +506,7 @@ components: format: date-time service: type: string - getnodeName: + nodeName: type: string eventType: type: string @@ -543,7 +543,7 @@ components: format: date-time service: type: string - getnodeName: + nodeName: type: string status: type: string @@ -557,11 +557,11 @@ components: type: integer format: int64 lastPolicyEvaluationTimeNs: - type: string - format: date-time + type: integer + format: int32 avgPolicyEvaluationTimeNs: - type: string - format: date-time + type: integer + format: int32 evaluationRequestsCount: type: integer format: int64 diff --git a/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/HealthEntry.java b/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/HealthEntry.java index c15a20ab7a0..592971b1fc3 100644 --- a/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/HealthEntry.java +++ b/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/HealthEntry.java @@ -73,11 +73,11 @@ public void setService(String service) { this.service = service; } - public String getnodeName() { + public String getNodeName() { return nodeName; } - public void setnodeName(String nodeName) { + public void setNodeName(String nodeName) { this.nodeName = nodeName; } diff --git a/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/LogEntry.java b/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/LogEntry.java index 2fb96540c2e..145f2f62c86 100644 --- a/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/LogEntry.java +++ b/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/LogEntry.java @@ -91,11 +91,11 @@ public void setService(String service) { this.service = service; } - public String getnodeName() { + public String getNodeName() { return nodeName; } - public void setnodeName(String nodeName) { + public void setNodeName(String nodeName) { this.nodeName = nodeName; } diff --git a/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/TelemetryEntry.java b/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/TelemetryEntry.java index 487806149e9..5edbad808cb 100644 --- a/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/TelemetryEntry.java +++ b/jans-config-api/plugins/lock-plugin/src/main/java/io/jans/configapi/plugin/lock/model/stat/TelemetryEntry.java @@ -94,11 +94,11 @@ public void setService(String service) { this.service = service; } - public String getnodeName() { + public String getNodeName() { return nodeName; } - public void setnodeName(String nodeName) { + public void setNodeName(String nodeName) { this.nodeName = nodeName; }