We expect a 201 here.

This commit is contained in:
Julien Palard 2019-07-02 16:15:52 +02:00
parent 5f71bde9c6
commit 5b7b40c2ef
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ pasee()
local HTTP_RESPONSE="$(<$TEMP_DIR/stdout)"
local STATUS_CODE="$(<$TEMP_DIR/stderr)"
JWT="$(jq -r ".access_token" <<< "$HTTP_RESPONSE")"
if [[ -z "$JWT" || "$STATUS_CODE" != "200" || "$JWT" == "null" ]]; then
if [[ -z "$JWT" || "$STATUS_CODE" != "201" || "$JWT" == "null" ]]; then
printf "HTTP Error %s: %s\n" "$STATUS_CODE" "$HTTP_RESPONSE"
fi
AUTH="Authorization: Bearer $JWT"