RSC_ID not ID
This commit is contained in:
@@ -14,9 +14,9 @@ check_get_rsc_token () {
|
||||
|
||||
if [ -z "${RSC_AUTH_TOKEN}" ]; then
|
||||
|
||||
if [[ "${ID}" =~ ^client ]]; then
|
||||
if [[ "${RSC_ID}" =~ ^client ]]; then
|
||||
# Looks like an RSC service account
|
||||
id_string=$(echo $ID | cut -d\| -f 2)
|
||||
id_string=$(echo $RSC_ID | cut -d\| -f 2)
|
||||
else
|
||||
# Not an RSC service account
|
||||
exit_with_error
|
||||
@@ -40,7 +40,7 @@ check_get_rsc_token () {
|
||||
get_rsc_token () {
|
||||
|
||||
MYENDPOINT="https://${RSC_HOST}/api/client_token"
|
||||
MYPAYLOAD="{\"client_id\":\"$ID\",\"client_secret\":\"$SECRET\"}"
|
||||
MYPAYLOAD="{\"client_id\":\"$RSC_ID\",\"client_secret\":\"$RSC_SECRET\"}"
|
||||
|
||||
http_response=$(curl -s -k -o /tmp/rbkresponse.$$ -w "%{http_code}" -X POST $MYENDPOINT -H "accept: application/json" -H "Content-Type: application/json" -d $MYPAYLOAD)
|
||||
check_http_error
|
||||
|
||||
Reference in New Issue
Block a user