Skip to content

Commit d6f4d23

Browse files
committed
Add missing userNotFound field to Cognito auth trigger requests
1 parent 815d21f commit d6f4d23

4 files changed

Lines changed: 9 additions & 3 deletions

events/cognito.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ type CognitoEventUserPoolsPreSignupResponse struct {
121121
type CognitoEventUserPoolsPreAuthenticationRequest struct {
122122
UserAttributes map[string]string `json:"userAttributes"`
123123
ValidationData map[string]string `json:"validationData"`
124+
UserNotFound bool `json:"userNotFound"`
124125
}
125126

126127
// CognitoEventUserPoolsPreAuthenticationResponse contains the response portion of a PreAuthentication event
@@ -309,6 +310,7 @@ type CognitoEventUserPoolsCreateAuthChallengeRequest struct {
309310
ChallengeName string `json:"challengeName"`
310311
Session []*CognitoEventUserPoolsChallengeResult `json:"session"`
311312
ClientMetadata map[string]string `json:"clientMetadata"`
313+
UserNotFound bool `json:"userNotFound"`
312314
}
313315

314316
// CognitoEventUserPoolsCreateAuthChallengeResponse defines create auth challenge response rarameters
@@ -331,6 +333,7 @@ type CognitoEventUserPoolsVerifyAuthChallengeRequest struct {
331333
PrivateChallengeParameters map[string]string `json:"privateChallengeParameters"`
332334
ChallengeAnswer interface{} `json:"challengeAnswer"`
333335
ClientMetadata map[string]string `json:"clientMetadata"`
336+
UserNotFound bool `json:"userNotFound"`
334337
}
335338

336339
// CognitoEventUserPoolsVerifyAuthChallengeResponse defines verify auth challenge response parameters

events/testdata/cognito-event-userpools-create-auth-challenge.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
],
2727
"clientMetadata": {
2828
"exampleMetadataKey": "example metadata value"
29-
}
29+
},
30+
"userNotFound": false
3031
},
3132
"response": {
3233
"publicChallengeParameters": {

events/testdata/cognito-event-userpools-preauthentication.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"validationData": {
1616
"k1": "v1",
1717
"k2": "v2"
18-
}
18+
},
19+
"userNotFound": false
1920
},
2021
"response": {}
2122
}

events/testdata/cognito-event-userpools-verify-auth-challenge.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"challengeAnswer": "123xxxx",
2323
"clientMetadata": {
2424
"exampleMetadataKey": "example metadata value"
25-
}
25+
},
26+
"userNotFound": false
2627
},
2728
"response": {
2829
"answerCorrect": true

0 commit comments

Comments
 (0)