Skip to content

Commit af8e8ed

Browse files
gbiagini97bmoffattBryan Moffatt
authored
added fields in IAM Identity struct (#440)
* added fields in IAM Identity struct Added CognitoIdentityAuthProvider and CognitoIdentityAuthType * update testdata * gofmt Co-authored-by: Bryan Moffatt <[email protected]> Co-authored-by: Bryan Moffatt <[email protected]>
1 parent b91101b commit af8e8ed

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

events/appsync.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ type AppSyncResolverTemplate struct {
1111

1212
// AppSyncIAMIdentity contains information about the caller authed via IAM.
1313
type AppSyncIAMIdentity struct {
14-
AccountID string `json:"accountId"`
15-
CognitoIdentityPoolID string `json:"cognitoIdentityPoolId"`
16-
CognitoIdentityID string `json:"cognitoIdentityId"`
17-
SourceIP []string `json:"sourceIp"`
18-
Username string `json:"username"`
19-
UserARN string `json:"userArn"`
14+
AccountID string `json:"accountId"`
15+
CognitoIdentityAuthProvider string `json:"cognitoIdentityAuthProvider"`
16+
CognitoIdentityAuthType string `json:"cognitoIdentityAuthType"`
17+
CognitoIdentityPoolID string `json:"cognitoIdentityPoolId"`
18+
CognitoIdentityID string `json:"cognitoIdentityId"`
19+
SourceIP []string `json:"sourceIp"`
20+
Username string `json:"username"`
21+
UserARN string `json:"userArn"`
2022
}
2123

2224
// AppSyncCognitoIdentity contains information about the caller authed via Cognito.

events/testdata/appsync-identity-iam.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"accountId": "accountid123",
33
"cognitoIdentityPoolId": "identitypoolid123",
44
"cognitoIdentityId": "identityid123",
5+
"cognitoIdentityAuthType": "authenticated",
6+
"cognitoIdentityAuthProvider": "providerABC",
57
"sourceIp": ["192.168.196.186", "193.168.196.186"],
68
"username": "user1",
79
"userArn": "arn:aws:iam::123456789012:user/appsync"

0 commit comments

Comments
 (0)