Skip to content

Commit

Permalink
Merge branch 'master' into DTSCCI-029-isle-of-wight-court
Browse files Browse the repository at this point in the history
  • Loading branch information
kdaHMCTS authored Apr 8, 2024
2 parents 9075b1d + 5090dd5 commit 0dbcbf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16.0
18.16.9
4 changes: 2 additions & 2 deletions bin/idam-lease-user-token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ IDAM_URL=${IDAM_STUB_LOCALHOST:-$IDAM_API_URL}
clientSecret=${CCD_API_GATEWAY_IDAM_CLIENT_SECRET:-ccd_gateway_secret}
redirectUri=${CCD_IDAM_REDIRECT_URL:-http://localhost:3451/oauth2redirect}
if [ -z "$IDAM_STUB_LOCALHOST" ]; then
code=$(curl --insecure --fail --show-error --silent -X POST --user "${username}:${password}" "${IDAM_URL}/oauth2/authorize?redirect_uri=${redirectUri}&response_type=code&client_id=ccd_gateway" -d "" | docker run --rm --interactive stedolan/jq -r .code)
code=$(curl --insecure --fail --show-error --silent -X POST --user "${username}:${password}" "${IDAM_URL}/oauth2/authorize?redirect_uri=${redirectUri}&response_type=code&client_id=ccd_gateway" -d "" | docker run --rm --interactive mikefarah/yq -r .code)
else
code=stubbed-value
fi

curl --insecure --fail --show-error --silent -X POST -H "Content-Type: application/x-www-form-urlencoded" --user "ccd_gateway:${clientSecret}" "${IDAM_URL}/oauth2/token?code=${code}&redirect_uri=${redirectUri}&grant_type=authorization_code" -d "" | docker run --rm --interactive stedolan/jq -r .access_token
curl --insecure --fail --show-error --silent -X POST -H "Content-Type: application/x-www-form-urlencoded" --user "ccd_gateway:${clientSecret}" "${IDAM_URL}/oauth2/token?code=${code}&redirect_uri=${redirectUri}&grant_type=authorization_code" -d "" | docker run --rm --interactive mikefarah/yq -r .access_token

0 comments on commit 0dbcbf9

Please sign in to comment.