Skip to content

Commit 1a58586

Browse files
nhibberdbmoffatt
authored andcommitted
Add missing 'apiKeyId' to APIGatewayRequestIdentity (#235)
* Add missing 'apiKeyId' to APIGatewayRequestIdentity * Update apigw tests with 'apiKeyId'
1 parent 02a2e04 commit 1a58586

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

events/apigw.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ type APIGatewayRequestIdentity struct {
4949
CognitoIdentityID string `json:"cognitoIdentityId"`
5050
Caller string `json:"caller"`
5151
APIKey string `json:"apiKey"`
52+
APIKeyID string `json:"apiKeyId"`
5253
AccessKey string `json:"accessKey"`
5354
SourceIP string `json:"sourceIp"`
5455
CognitoAuthenticationType string `json:"cognitoAuthenticationType"`

events/testdata/apigw-request.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"resource": "/{proxy+}",
33
"path": "/hello/world",
44
"httpMethod": "POST",
@@ -67,6 +67,7 @@
6767
"cognitoIdentityId": "theCognitoIdentityId",
6868
"caller": "theCaller",
6969
"apiKey": "theApiKey",
70+
"apiKeyId": "theApiKeyId",
7071
"accessKey": "ANEXAMPLEOFACCESSKEY",
7172
"sourceIp": "192.168.196.186",
7273
"cognitoAuthenticationType": "theCognitoAuthenticationType",
@@ -79,7 +80,7 @@
7980
"principalId": "admin",
8081
"clientId": 1,
8182
"clientName": "Exata"
82-
},
83+
},
8384
"resourcePath": "/{proxy+}",
8485
"httpMethod": "POST",
8586
"apiId": "gy415nuibc"

events/testdata/apigw-restapi-openapi-request.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"cognitoIdentityId": "theCognitoIdentityId",
6969
"caller": "theCaller",
7070
"apiKey": "theApiKey",
71+
"apiKeyId": "theApiKeyId",
7172
"accessKey": "ANEXAMPLEOFACCESSKEY",
7273
"sourceIp": "192.168.196.186",
7374
"cognitoAuthenticationType": "theCognitoAuthenticationType",

events/testdata/apigw-websocket-request.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"cognitoIdentityId": "theCognitoIdentityId",
7373
"caller": "theCaller",
7474
"apiKey": "theApiKey",
75+
"apiKeyId": "theApiKeyId",
7576
"accessKey": "ANEXAMPLEOFACCESSKEY",
7677
"sourceIp": "192.168.196.186",
7778
"cognitoAuthenticationType": "theCognitoAuthenticationType",

0 commit comments

Comments
 (0)