Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Projets-INFO4
20-21
18
chirpstack-monitoring
Commits
08dafc8b
Commit
08dafc8b
authored
Apr 04, 2021
by
Antoine Blanquet
Browse files
Bug Fix : gitignore clean Tokens with username uppercase name
parent
c603f7b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
reports/ChirpstackMonitoring.token.json
deleted
100644 → 0
View file @
c603f7b8
{
"jwt"
:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjaGlycHN0YWNrLWFwcGxpY2F0aW9uLXNlcnZlciIsImV4cCI6MTYxNjU5NTcwOSwiaXNzIjoiY2hpcnBzdGFjay1hcHBsaWNhdGlvbi1zZXJ2ZXIiLCJuYmYiOjE2MTY1MDkzMDksInN1YiI6InVzZXIiLCJ1c2VybmFtZSI6IkNoaXJwc3RhY2tNb25pdG9yaW5nIn0.zeOC4P_bqR5o1MZu1RZWnQTmkt7KMTdPGpAxdhVBLGE"
}
\ No newline at end of file
reports/get_jwt.sh
View file @
08dafc8b
...
...
@@ -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
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment