Skip to content

Commit

Permalink
Update update-kc.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
JavaDeveloper456788 authored Dec 17, 2024
1 parent a177652 commit 6225a24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Keycloak/update-kc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 6225a24

Please sign in to comment.