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 d0c1920 commit 4bd0c69
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Keycloak/update-kc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@ do
--data-raw "$line")
echo -e " Response : $result\n"
default_scopes=$(echo "$line" | jq -r '.defaultClientScopes[]')
clientId=$(echo "$line" | jq -r '.clientId')
echo "$default_scopes" | while read -r scope; do
echo "$scope"
echo "$clientId"
echo "$scope"
#PUT /{realm}/clients/{id}/default-client-scopes/{clientScopeId}
result=$(curl -s -v -w "%{http_code}" -X PUT "$KC_BASE_URL/$KC_REALM_ID/clients/$clientId/default-client-scopes/$scope" \
--header "Authorization: Bearer $TKN" \
--header "Content-Type: application/json" \
)
echo -e " Response : $result\n"

done
done < clients.sh

0 comments on commit 4bd0c69

Please sign in to comment.