support also not encoded contexts

This commit is contained in:
Marco Lettere 2022-01-25 14:12:52 +01:00
parent 85051056be
commit a0defed409
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
"id" : "${workflow.input.client_id}",
"ctx" : "${workflow.input.context}",
"scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))}; if(e($.id) || e($.ctx)) throw('Client ID and Context must not be empty'); else return { encoded_root_vo : encodeURI($.root_vo)}"
"scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))}; if(e($.id) || e($.ctx)) throw('Client ID and Context must not be empty'); else return { encoded_root_vo : encodeURI($.root_vo), encoded_context : $.ctx.replaceAll("/", "%2F")}"
}
},
{
@ -88,7 +88,7 @@
"type" : "SIMPLE",
"inputParameters" : {
"url" : "${init.input.keycloak_admin}/clients",
"params" : { "clientId" : "${workflow.input.context}"},
"params" : { "clientId" : "${init.output.encoded_context}"},
"method" : "GET",
"headers" : {
"Authorization" : "Bearer ${authorize.output.body.access_token}",