Skip to content

Commit

Permalink
DTSCCI-0000 Switch jq to yq (#3663)
Browse files Browse the repository at this point in the history
* Switch jq to yq

* Update .nvmrc

* update CVEs
  • Loading branch information
linusnorton authored Apr 8, 2024
1 parent 4f2cec9 commit 5090dd5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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
Loading

0 comments on commit 5090dd5

Please sign in to comment.