test(keycloak): fix Keycloak OIDC live fixture (#6563)

This commit is contained in:
Zhengchao An
2026-08-25 21:20:03 +08:00
committed by GitHub
parent b4e6c1b081
commit 02317dd36f
2 changed files with 7 additions and 2 deletions
+2
View File
@@ -27,6 +27,8 @@
{
"id": "00000000-0000-0000-0000-000000000001",
"username": "alice",
"firstName": "Alice",
"lastName": "RustFS",
"email": "alice@example.test",
"emailVerified": true,
"enabled": true,
+5 -2
View File
@@ -128,14 +128,17 @@ token_for_client() {
local client_id="$1"
local client_secret="$2"
local response_file="${WORK_DIR}/token-${client_id}.json"
curl --noproxy '*' -fsS "${ISSUER}/protocol/openid-connect/token" \
if ! curl --noproxy '*' -sS --fail-with-body "${ISSUER}/protocol/openid-connect/token" \
--data-urlencode grant_type=password \
--data-urlencode "client_id=${client_id}" \
--data-urlencode "client_secret=${client_secret}" \
--data-urlencode username=alice \
--data-urlencode password=alice-password \
--data-urlencode scope=openid \
>"${response_file}"
>"${response_file}"; then
cat "${response_file}" >&2
return 1
fi
python3 - "${response_file}" "${ISSUER}" "${client_id}" <<'PY'
import base64
import json