diff options
| -rwxr-xr-x | src/oidc/bin/01_authz_code | 2 | ||||
| -rwxr-xr-x | src/oidc/bin/02_authz_code_token_request | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/oidc/bin/01_authz_code b/src/oidc/bin/01_authz_code index 80fb250..a3fadd4 100755 --- a/src/oidc/bin/01_authz_code +++ b/src/oidc/bin/01_authz_code @@ -3,4 +3,4 @@ set -e cd "$(dirname "$0")/.." -curl -v -s "http://localhost:8282/authorize?response_type=code&scope=openid&client_id=f00d&state=potatoe&redirect_uri=http://example.org/callback" +curl -s "http://localhost:8282/authorize?response_type=code&scope=openid&client_id=f00d&state=potatoe&redirect_uri=http://example.org/callback" diff --git a/src/oidc/bin/02_authz_code_token_request b/src/oidc/bin/02_authz_code_token_request index 65a8ab8..e832701 100755 --- a/src/oidc/bin/02_authz_code_token_request +++ b/src/oidc/bin/02_authz_code_token_request @@ -3,8 +3,16 @@ set -e cd "$(dirname "$0")/.." +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=ad2bcbc1-b61b-47bf-80a2-13882f6f6eab&redirect_uri=http://example.org/callback" \ + -d "grant_type=authorization_code&code=${CODE}&redirect_uri=http://example.org/callback" \ "http://localhost:8282/token" |
