Commit 08dafc8b authored by Antoine Blanquet's avatar Antoine Blanquet
Browse files

Bug Fix : gitignore clean Tokens with username uppercase name

parent c603f7b8
\ No newline at end of file
......@@ -67,11 +67,12 @@ HEAD="${CURL} -X HEAD --header \""$ACCEPT_JSON"\""
# Authenfication operations
# -----------------------------------
USERNAME_LOWERCASE=${USERNAME,,} #lowercasing the name of json token file for a clean cleaning git ignore.
# Get the Bearer token for the user
rm $USERNAME.token.json
${POST} --header "$CONTENT_JSON" -d "$AUTH_JSON" ${URL}/api/internal/login > $USERNAME.token.json
TOKEN=$(jq -r '.jwt' $USERNAME.token.json)
rm *.token.json #delete old tokens
${POST} --header "$CONTENT_JSON" -d "$AUTH_JSON" ${URL}/api/internal/login > $USERNAME_LOWERCASE.token.json
TOKEN=$(jq -r '.jwt' $USERNAME_LOWERCASE.token.json)
AUTH="Grpc-Metadata-Authorization: Bearer $TOKEN"
echo "$TOKEN"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment