mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-03-01 01:40:42 +00:00
minor tweaks to get_token w/ burnettk
This commit is contained in:
parent
4344e015ca
commit
9725a45241
@ -26,7 +26,6 @@ if [[ -z "${BACKEND_BASE_URL:-}" ]]; then
|
|||||||
fi
|
fi
|
||||||
if [[ -z "${KEYCLOAK_BASE_URL:-}" ]]; then
|
if [[ -z "${KEYCLOAK_BASE_URL:-}" ]]; then
|
||||||
# KEYCLOAK_BASE_URL=http://localhost:7002
|
# KEYCLOAK_BASE_URL=http://localhost:7002
|
||||||
KEYCLOAK_BASE_URL=https://keycloak.dev.spiffworkflow.org
|
|
||||||
if grep -qE "spiffworkflow.org" <<<"$BACKEND_BASE_URL" ; then
|
if grep -qE "spiffworkflow.org" <<<"$BACKEND_BASE_URL" ; then
|
||||||
env_domain=$(sed -E 's/.*api\.(\w+\.spiffworkflow.org).*/\1/' <<<"${BACKEND_BASE_URL}")
|
env_domain=$(sed -E 's/.*api\.(\w+\.spiffworkflow.org).*/\1/' <<<"${BACKEND_BASE_URL}")
|
||||||
KEYCLOAK_BASE_URL="https://keycloak.${env_domain}"
|
KEYCLOAK_BASE_URL="https://keycloak.${env_domain}"
|
||||||
@ -72,7 +71,6 @@ result=$(curl -s -X POST "$KEYCLOAK_URL" "$INSECURE" \
|
|||||||
-d "password=$PASSWORD" \
|
-d "password=$PASSWORD" \
|
||||||
-d 'grant_type=password' \
|
-d 'grant_type=password' \
|
||||||
-d "client_id=$BACKEND_CLIENT_ID" \
|
-d "client_id=$BACKEND_CLIENT_ID" \
|
||||||
-d "audienc111e=${BACKEND_CLIENT_ID}" \
|
|
||||||
)
|
)
|
||||||
backend_token=$(jq -r '.access_token' <<< "$result")
|
backend_token=$(jq -r '.access_token' <<< "$result")
|
||||||
if [[ -z "$backend_token" || "$backend_token" == "null" ]]; then
|
if [[ -z "$backend_token" || "$backend_token" == "null" ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user