Skip to content

Commit

Permalink
Add missing 'apiKeyId' to APIGatewayRequestIdentity (#235)
Browse files Browse the repository at this point in the history
* Add missing 'apiKeyId' to APIGatewayRequestIdentity

* Update apigw tests with 'apiKeyId'
  • Loading branch information
nhibberd authored and bmoffatt committed Sep 18, 2019
1 parent 02a2e04 commit 1a58586
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
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 1a58586

Please sign in to comment.