Skip to content

Commit

Permalink
Secure the Token!
Browse files Browse the repository at this point in the history
  • Loading branch information
linickx committed Mar 18, 2015
1 parent 35fa927 commit 6218472
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/auth.sh
Expand Up @@ -90,6 +90,8 @@ function curl_auth() {
# http://stackoverflow.com/questions/2220301/how-to-evaluate-http-response-codes-from-bash-shell-script
AUTH=`curl --write-out %{http_code} -s -o $AUTHFILE -H "Content-Type: application/json" -d "{ \"auth\": { \"RAX-KSKEY:apiKeyCredentials\": { \"username\":\"$RSUSER\",\"apiKey\":\"$RSAPIKEY\" } } }" $AUTHSVR`

chmod 600 $AUTHFILE

if [[ $AUTH == "200" ]]; then
read_token
else
Expand Down

0 comments on commit 6218472

Please sign in to comment.