File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # API_URL=https://api-gw.platform.linuxfoundation.org/cla-service
3+ # DEBUG='' API_URL=https://api-gw.platform.linuxfoundation.org/cla-service companyId='5e8f3a01-b117-4c10-ac26-9dec430bf9c5' projectId='a092M00001JwBlEQAV' ./utils/get_project_company_signatures_v4.sh
4+ if [ -z " $TOKEN " ]
5+ then
6+ # source ./auth0_token.secret
7+ TOKEN=" $( cat ./auth0.token.secret) "
8+ fi
9+
10+ if [ -z " $TOKEN " ]
11+ then
12+ echo " $0 : TOKEN not specified and unable to obtain one"
13+ exit 1
14+ fi
15+
16+ if [ -z " $XACL " ]
17+ then
18+ XACL=" $( cat ./x-acl.secret) "
19+ fi
20+
21+ if [ -z " $XACL " ]
22+ then
23+ echo " $0 : XACL not specified and unable to obtain one"
24+ exit 2
25+ fi
26+
27+ if [ -z " ${companyId} " ]
28+ then
29+ echo " $0 : you need to specify companyId='...'"
30+ exit 3
31+ fi
32+
33+ if [ -z " ${projectId} " ]
34+ then
35+ echo " $0 : you need to specify projectId='...'"
36+ exit 4
37+ fi
38+
39+ if [ -z " $API_URL " ]
40+ then
41+ export API_URL=" http://localhost:5001"
42+ fi
43+
44+ export API_PATH=" v4/signatures/project/${projectId} /company/${companyId} "
45+
46+ if [ ! -z " $DEBUG " ]
47+ then
48+ echo " curl -s -XGET -H 'X-ACL: ${XACL} ' -H 'Authorization: Bearer ${TOKEN} ' -H 'Content-Type: application/json' '${API_URL} /${API_PATH} ' | jq -r '.'"
49+ curl -s -XGET -H " X-ACL: ${XACL} " -H " Authorization: Bearer ${TOKEN} " -H " Content-Type: application/json" " ${API_URL} /${API_PATH} "
50+ else
51+ curl -s -XGET -H " X-ACL: ${XACL} " -H " Authorization: Bearer ${TOKEN} " -H " Content-Type: application/json" " ${API_URL} /${API_PATH} " | jq -r ' .'
52+ fi
You can’t perform that action at this time.
0 commit comments