Skip to content

Commit

Permalink
Ready for review
Browse files Browse the repository at this point in the history
Signed-off-by: Łukasz Gryglicki <[email protected]>
  • Loading branch information
lukaszgryglicki committed Dec 5, 2024
1 parent 32c9f1d commit 7aa75a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 90 deletions.
22 changes: 11 additions & 11 deletions utils/request_corporate_signature_go_post.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash
# API_URL=https://[xyz].ngrok-free.app (defaults to localhost:5000)
# company_id='862ff296-6508-4f10-9147-2bc2dd7bfe80'
# project_id='88ee12de-122b-4c46-9046-19422054ed8d'
# company_sfid='0016s000006Uq9VAAS'
# project_sfid='a092h000004wx1DAAQ'
# return_url_type='github'
# return_url='http://localhost'
# TOKEN='...' - Auth0 JWT bearer token
# XACL='...' - X-ACL
# DEBUG=1 XACL="$(cat ./x-acl.secret)" TOKEN="$(cat ./auth0.token.secret)" ./utils/request_corporate_signature_go_post.sh 862ff296-6508-4f10-9147-2bc2dd7bfe80 88ee12de-122b-4c46-9046-19422054ed8d github 'http://localhost'
# DEBUG=1 XACL="$(cat ./x-acl.secret)" TOKEN="$(cat ./auth0.token.secret)" ./utils/request_corporate_signature_go_post.sh 0016s000006Uq9VAAS a092h000004wx1DAAQ github 'http://localhost'

if [ -z "$TOKEN" ]
then
Expand All @@ -15,7 +15,7 @@ then
fi

if [ -z "$TOKEN" ]
then
then
echo "$0: TOKEN not specified and unable to obtain one"
exit 1
fi
Expand All @@ -33,17 +33,17 @@ fi

if [ -z "$1" ]
then
echo "$0: you need to specify company_id as a 1st parameter"
echo "$0: you need to specify company_sfid as a 1st parameter"
exit 1
fi
export company_id="$1"
export company_sfid="$1"

if [ -z "$2" ]
then
echo "$0: you need to specify project_id as a 2nd parameter"
echo "$0: you need to specify project_sfid as a 2nd parameter"
exit 2
fi
export project_id="$2"
export project_sfid="$2"

if [ -z "$3" ]
then
Expand All @@ -54,7 +54,7 @@ export return_url_type="$3"

if [ -z "$4" ]
then
echo "$0: you need to specify return_url as a 4th parameter"
echo "$0: you need to specify return_urlas a 4th parameter"
exit 4
fi
export return_url="$4"
Expand All @@ -66,6 +66,6 @@ fi

if [ ! -z "$DEBUG" ]
then
echo "curl -s -XPOST -H 'X-ACL: ${XACL}' -H 'Authorization: Bearer ${TOKEN}' -H 'Content-Type: application/json' '${API_URL}/v4/request-corporate-signature' -d '{\"project_id\":\"${project_id}\",\"company_id\":\"${company_id}\",\"return_url_type\":\"${return_url_type}\",\"return_url\":\"${return_url}\"}' | jq -r '.'"
echo "curl -s -XPOST -H 'X-ACL: ${XACL}' -H 'Authorization: Bearer ${TOKEN}' -H 'Content-Type: application/json' '${API_URL}/v4/request-corporate-signature' -d '{\"project_sfid\":\"${project_sfid}\",\"company_sfid\":\"${company_sfid}\",\"return_url_type\":\"${return_url_type}\",\"return_url\":\"${return_url}\"}' | jq -r '.'"
fi
curl -s -XPOST -H "X-ACL: ${XACL}" -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" "${API_URL}/v4/request-corporate-signature" -d "{\"project_id\":\"${project_id}\",\"company_id\":\"${company_id}\",\"return_url_type\":\"${return_url_type}\",\"return_url\":\"${return_url}\"}" | jq -r '.'
curl -s -XPOST -H "X-ACL: ${XACL}" -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" "${API_URL}/v4/request-corporate-signature" -d "{\"project_sfid\":\"${project_sfid}\",\"company_sfid\":\"${company_sfid}\",\"return_url_type\":\"${return_url_type}\",\"return_url\":\"${return_url}\"}" | jq -r '.'
79 changes: 0 additions & 79 deletions utils/request_employee_signature_go_post.sh

This file was deleted.

0 comments on commit 7aa75a8

Please sign in to comment.