From 6f94ff61250387b9a87aa945f3bf49c09146ff4b Mon Sep 17 00:00:00 2001 From: "m.lettere" Date: Thu, 12 Jan 2023 18:03:39 +0100 Subject: [PATCH] anticipated group creation even more --- templates/group_created.json.j2 | 152 ++++++++++++++++++++------------ 1 file changed, 96 insertions(+), 56 deletions(-) diff --git a/templates/group_created.json.j2 b/templates/group_created.json.j2 index 9ab4993..e13a090 100644 --- a/templates/group_created.json.j2 +++ b/templates/group_created.json.j2 @@ -114,7 +114,80 @@ "scriptExpression": "var client_id = $.client_location.split('/').pop(); return {'client_id' : client_id}" } }, - { + { + "name" : "pyrest", + "taskReferenceName" : "list_kc_groups", + "type" : "SIMPLE", + "inputParameters" : { + "url" : "${init.input.keycloak_admin}/groups", + "method" : "GET", + "headers" : { + "Authorization" : "Bearer ${authorize.output.body.access_token}", + "Accept" : "application/json" + } + } + }, + { + "name": "LAMBDA_TASK", + "taskReferenceName": "prepare", + "type": "LAMBDA", + "inputParameters": { + "append": "${init.output.result.append}", + "groups": "${list_kc_groups.output.body}", + "scriptExpression": "function recurse(inp){for(var i=0;i