added token generator and getting token from token.json
This commit is contained in:
parent
888a9f716b
commit
f62375ae54
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
## USAGE: ./newToken.sh -u USERNAME -p PASSWORD
|
||||
## USAGE: ./newToken.sh -u Username -p Password -n UniqueTokenName
|
||||
|
||||
|
||||
while getopts u:p:n: flag
|
||||
|
@ -18,7 +18,7 @@ response=$(curl --request POST \
|
|||
|
||||
echo -n '{"bearer' > token.json
|
||||
token=$(echo $response | jq ".token")
|
||||
#echo ${token:1:-1}
|
||||
|
||||
uid=$(echo $response | jq ".idUser")
|
||||
echo -n ${response:7:-1} >> token.json
|
||||
|
||||
|
|
Loading…
Reference in New Issue