Skip to content

Instantly share code, notes, and snippets.

@gbataille
Created August 27, 2018 13:24
Show Gist options
  • Save gbataille/099a9eb4989c4277e9ce3312c8014391 to your computer and use it in GitHub Desktop.
Save gbataille/099a9eb4989c4277e9ce3312c8014391 to your computer and use it in GitHub Desktop.
set -x
set -e
rt=`curl -X POST http://local.pix4d.com:8000/oauth2/token/ \
-H 'content-type: multipart/form-data' \
-F grant_type=password \
-F username=gregory.bataille@pix4d.com \
-F 'password=foobar' \
-F client_id=abc \
-F client_secret=def123 \
-F token_format=jwt \
| jq -r .refresh_token`
curl -X POST http://local.pix4d.com:8000/oauth2/token/ \
-H 'content-type: multipart/form-data;' \
-F grant_type=refresh_token \
-F client_id=abc \
-F client_secret=def123 \
-F refresh_token=$rt > out.1 2>&1 & \
curl -X POST http://local.pix4d.com:8000/oauth2/token/ \
-H 'content-type: multipart/form-data;' \
-F grant_type=refresh_token \
-F client_id=abc \
-F client_secret=def123 \
-F refresh_token=$rt > out.2 2>&1 & \
curl -X POST http://local.pix4d.com:8000/oauth2/token/ \
-H 'content-type: multipart/form-data;' \
-F grant_type=refresh_token \
-F client_id=abc \
-F client_secret=def123 \
-F refresh_token=$rt > out.3 2>&1 & \
curl -X POST http://local.pix4d.com:8000/oauth2/token/ \
-H 'content-type: multipart/form-data;' \
-F grant_type=refresh_token \
-F client_id=abc \
-F client_secret=def123 \
-F refresh_token=$rt > out.4 2>&1 & \
curl -X POST http://local.pix4d.com:8000/oauth2/token/ \
-H 'content-type: multipart/form-data;' \
-F grant_type=refresh_token \
-F client_id=abc \
-F client_secret=def123 \
-F refresh_token=$rt > out.5 2>&1 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment