diff options
| author | mo khan <mo@mokhan.ca> | 2022-04-22 17:30:21 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2022-04-22 17:30:21 -0600 |
| commit | 0b09e735c9733f557e1ec7138e108e8d5bd7a7f5 (patch) | |
| tree | e05d88d76fd8c2be3526e0bfd379bf4bbdc2a742 /script/02_authz_code_token_request | |
| parent | 9fd1a9f376fb315ebbe8171aa989298fc34c66ce (diff) | |
rename bin to script
Diffstat (limited to 'script/02_authz_code_token_request')
| -rwxr-xr-x | script/02_authz_code_token_request | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/script/02_authz_code_token_request b/script/02_authz_code_token_request new file mode 100755 index 0000000..91bbcdb --- /dev/null +++ b/script/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" |
