diff --git a/Keycloak/update-kc.sh b/Keycloak/update-kc.sh index 28c40de..216e8a3 100644 --- a/Keycloak/update-kc.sh +++ b/Keycloak/update-kc.sh @@ -65,7 +65,7 @@ do fi result=$(curl -s -w "%{http_code}" -X POST "$KC_BASE_URL/$KC_REALM_ID/client-scopes" \ - --header "Authorization: Bearer "$(cat "$TKN_FILE")" \ + --header "Authorization: Bearer "$(cat "$TKN_FILE")" " \ --header "Content-Type: application/json" \ --data-raw "{\"id\": \"$CLIENT_SCOPE_TRIMMED\", \"name\": \"$CLIENT_SCOPE\", \"protocol\": \"openid-connect\", \"attributes\": { \"include.in.token.scope\": \"true\", \"display.on.consent.screen\": \"false\"}}") echo -e " Response : $result\n" @@ -78,7 +78,7 @@ echo -e "CREATE Clients \n" jq -c '.[]' clients.sh | while read -r client; do result=$(curl -s -w "%{http_code}" -X POST "$KC_BASE_URL/$KC_REALM_ID/clients" \ - --header "Authorization: Bearer "$(cat "$TKN_FILE")" \ + --header "Authorization: Bearer "$(cat "$TKN_FILE")" " \ --header "Content-Type: application/json" \ --data-raw "$client") echo -e " Response : $result\n" @@ -95,7 +95,7 @@ jq -c '.[]' clients.sh | while read -r client; do echo "$scope" #PUT /{realm}/clients/{id}/default-client-scopes/{clientScopeId} result=$(curl -s -w "%{http_code}" -X PUT "$KC_BASE_URL/$KC_REALM_ID/clients/$CLIENT_UUID/default-client-scopes/$scope" \ - --header "Authorization: Bearer "$(cat "$TKN_FILE")" \ + --header "Authorization: Bearer "$(cat "$TKN_FILE")" " \ --header "Content-Type: application/json" \ ) echo -e " Response : $result\n"