-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP 'request_individual_signature' API
Signed-off-by: Łukasz Gryglicki <[email protected]>
- Loading branch information
1 parent
8e02cb1
commit 3eeaf1f
Showing
9 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
aws --profile lfproduct-dev dynamodb describe-table --table-name cla-dev-signatures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
aws --profile lfproduct-dev dynamodb query --table-name cla-dev-projects --index-name project-name-lower-search-index --key-condition-expression "project_name_lower = :name" --expression-attribute-values '{":name":{"S":"child group earths"}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
aws --profile lfproduct-dev dynamodb query --table-name cla-dev-users --index-name github-username-index --key-condition-expression "user_github_username = :name" --expression-attribute-values '{":name":{"S":"lukaszgryglicki"}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
# API_URL=https://3f13-147-75-85-27.ngrok-free.app (defaults to localhost:5000) | ||
# user_id='9dcf5bbc-2492-11ed-97c7-3e2a23ea20b5' | ||
# project_id='88ee12de-122b-4c46-9046-19422054ed8d' | ||
# return_url_type='github' | ||
# return_url='http://localhost' | ||
|
||
if [ -z "$1" ] | ||
then | ||
echo "$0: you need to specify user_id as a 1st parameter" | ||
exit 1 | ||
fi | ||
export user_id="$1" | ||
|
||
if [ -z "$2" ] | ||
then | ||
echo "$0: you need to specify project_id as a 2nd parameter" | ||
exit 2 | ||
fi | ||
export project_id="$2" | ||
|
||
if [ -z "$3" ] | ||
then | ||
echo "$0: you need to specify return_url_type as a 3rd parameter: github|gitlab|gerrit" | ||
exit 3 | ||
fi | ||
export return_url_type="$3" | ||
|
||
if [ -z "$4" ] | ||
then | ||
echo "$0: you need to specify return_url as a 4th parameter" | ||
exit 4 | ||
fi | ||
export return_url="$4" | ||
|
||
if [ -z "$API_URL" ] | ||
then | ||
export API_URL="http://localhost:5000" | ||
fi | ||
|
||
if [ ! -z "$DEBUG" ] | ||
then | ||
echo "curl -s -XPOST -H 'Authorization: Bearer ${TOKEN}' -H 'Content-Type: application/json' '${API_URL}/v2/request-individual-signature' -d '{\"project_id\":\"${project_id}\",\"user_id\":\"${user_id}\",\"return_url_type\":\"${return_url_type}\",\"return_url\":\"${return_url}\"}' | jq -r '.'" | ||
fi | ||
curl -s -XPOST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" "${API_URL}/v2/request-individual-signature" -d "{\"project_id\":\"${project_id}\",\"user_id\":\"${user_id}\",\"return_url_type\":\"${return_url_type}\",\"return_url\":\"${return_url}\"}" | jq -r '.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
aws --profile lfproduct-dev dynamodb scan --table-name cla-dev-projects --max-items 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
aws --profile lfproduct-dev dynamodb scan --table-name cla-dev-signatures --max-items 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ unset REGION | |
unset AWS_ROLE_ARN | ||
unset AWS_TOKEN_SERIAL | ||
unset AWS_SDK_LOAD_CONFIG | ||
unset GITHUB_OAUTH_TOKEN |