Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

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

Bug Fix : gitignore clean Tokens with username uppercase name

parent c603f7b8
{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjaGlycHN0YWNrLWFwcGxpY2F0aW9uLXNlcnZlciIsImV4cCI6MTYxNjU5NTcwOSwiaXNzIjoiY2hpcnBzdGFjay1hcHBsaWNhdGlvbi1zZXJ2ZXIiLCJuYmYiOjE2MTY1MDkzMDksInN1YiI6InVzZXIiLCJ1c2VybmFtZSI6IkNoaXJwc3RhY2tNb25pdG9yaW5nIn0.zeOC4P_bqR5o1MZu1RZWnQTmkt7KMTdPGpAxdhVBLGE"}
\ 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"
......
Markdown is supported
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