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 9, 2024
1 parent 97803d8 commit 4a4320c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Keycloak/update-kc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ do
--data-raw "$line")
echo -e " Response : $result\n"
default_scopes=$(echo "$line" | jq -r '.defaultClientScopes[]')
clientId=$(echo "$line" | jq -r '.clientId')
CLIENT_UUID=$(curl -s -X GET "$KC_BASE_URL/$KC_REALM_ID/clients" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TKN" \
| jq '.[] | select(.clientId=="'"$CLIENT_ID"'")' | jq -r '.id')
| jq '.[] | select(.clientId=="'"$clientId"'")' | jq -r '.id')

echo "$default_scopes" | while read -r scope; do
echo "$CLIENT_UUID"
Expand Down

0 comments on commit 4a4320c

Please sign in to comment.