diff options
| author | mo khan <mo@mokhan.ca> | 2022-04-22 14:40:41 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2022-04-22 14:40:41 -0600 |
| commit | fb0451985da0574a02a339d2d8dabcf0477ce425 (patch) | |
| tree | 31dc3ff1c811679202bf19c30eee05fbaf0af3fe /bin/02_authz_code_token_request | |
| parent | 0815655919005dac35cee091f7144639f51334ce (diff) | |
embed insecure private key
Diffstat (limited to 'bin/02_authz_code_token_request')
| -rwxr-xr-x | bin/02_authz_code_token_request | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/02_authz_code_token_request b/bin/02_authz_code_token_request new file mode 100755 index 0000000..91bbcdb --- /dev/null +++ b/bin/02_authz_code_token_request @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e +cd "$(dirname "$0")/.." +HOST="${HOST:-http://localhost:8282}" + +if [ $# -eq 0 ]; then + echo "Usage:" + echo "$0 <code>" + exit 1 +fi + +CODE="${1}" +curl -s \ + -u "client_id:client_secret" \ + --basic \ + -d "grant_type=authorization_code&code=${CODE}&redirect_uri=http://example.org/callback" \ + "${HOST}/token" |
