Skip to content

Commit

Permalink
Merge branch 'master' into update#186
Browse files Browse the repository at this point in the history
  • Loading branch information
diegobernardes authored Oct 10, 2019
2 parents 466dad2 + 319e4b3 commit f76ce0d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ before_script:
- LINT_PKGS=$(go list ./... | grep -Ev 'aws-lambda-go/lambda')

script:
- diff -u <(echo -n) <(gofmt -d ./) # Fail if a .go file hasn't been formatted with gofmt
- goverage -v -covermode=atomic -coverprofile=coverage.txt $PKGS # Run all tests with coverage
- go vet -v ./... # static analyisis
- golint $LINT_PKGS # lint - ignore failures for now
- diff -u <(echo -n) <(gofmt -d ./) # Fail if a .go file hasn't been formatted with gofmt
- goverage -v -race -covermode=atomic -coverprofile=coverage.txt $PKGS # Run all tests with coverage
- go vet -v ./... # static analyisis
- golint $LINT_PKGS # lint - ignore failures for now

after_success:
- bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion events/README_Cognito_UserPools_PreTokenGen.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

func handler(event events.CognitoEventUserPoolsPreTokenGen) (events.CognitoEventUserPoolsPreTokenGen, error) {
fmt.Printf("PreTokenGen of user: %s\n", event.UserName)
event.Response.ClaimOverrideDetails.ClaimsToSupress = []string{"family_name"}
event.Response.ClaimsOverrideDetails.ClaimsToSuppress = []string{"family_name"}
return event, nil
}

Expand Down
1 change: 1 addition & 0 deletions events/apigw.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ type APIGatewayRequestIdentity struct {
CognitoIdentityID string `json:"cognitoIdentityId"`
Caller string `json:"caller"`
APIKey string `json:"apiKey"`
APIKeyID string `json:"apiKeyId"`
AccessKey string `json:"accessKey"`
SourceIP string `json:"sourceIp"`
CognitoAuthenticationType string `json:"cognitoAuthenticationType"`
Expand Down
5 changes: 3 additions & 2 deletions events/testdata/apigw-request.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"resource": "/{proxy+}",
"path": "/hello/world",
"httpMethod": "POST",
Expand Down Expand Up @@ -67,6 +67,7 @@
"cognitoIdentityId": "theCognitoIdentityId",
"caller": "theCaller",
"apiKey": "theApiKey",
"apiKeyId": "theApiKeyId",
"accessKey": "ANEXAMPLEOFACCESSKEY",
"sourceIp": "192.168.196.186",
"cognitoAuthenticationType": "theCognitoAuthenticationType",
Expand All @@ -79,7 +80,7 @@
"principalId": "admin",
"clientId": 1,
"clientName": "Exata"
},
},
"resourcePath": "/{proxy+}",
"httpMethod": "POST",
"apiId": "gy415nuibc"
Expand Down
1 change: 1 addition & 0 deletions events/testdata/apigw-restapi-openapi-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"cognitoIdentityId": "theCognitoIdentityId",
"caller": "theCaller",
"apiKey": "theApiKey",
"apiKeyId": "theApiKeyId",
"accessKey": "ANEXAMPLEOFACCESSKEY",
"sourceIp": "192.168.196.186",
"cognitoAuthenticationType": "theCognitoAuthenticationType",
Expand Down
1 change: 1 addition & 0 deletions events/testdata/apigw-websocket-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"cognitoIdentityId": "theCognitoIdentityId",
"caller": "theCaller",
"apiKey": "theApiKey",
"apiKeyId": "theApiKeyId",
"accessKey": "ANEXAMPLEOFACCESSKEY",
"sourceIp": "192.168.196.186",
"cognitoAuthenticationType": "theCognitoAuthenticationType",
Expand Down

0 comments on commit f76ce0d

Please sign in to comment.