-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add user_not_found to Create/Verify auth challenge events
- Adds `user_not_found` field to: - `CognitoEventUserPoolsCreateAuthChallengeRequest` - `CognitoEventUserPoolsVerifyAuthChallengeRequest` - Adds test cases where `user_not_found` becomes `true` for: - `CognitoEventUserPoolsDefineAuthChallengeRequest` - `CognitoEventUserPoolsCreateAuthChallengeRequest` - `CognitoEventUserPoolsVerifyAuthChallengeRequest` issue #718
- Loading branch information
Showing
7 changed files
with
159 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...ts/src/fixtures/example-cognito-event-userpools-create-auth-challenge-user-not-found.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"version": "1", | ||
"region": "us-west-2", | ||
"userPoolId": "<userPoolId>", | ||
"userName": "<userName>", | ||
"callerContext": { | ||
"awsSdkVersion": "aws-sdk-unknown-unknown", | ||
"clientId": "<clientId>" | ||
}, | ||
"triggerSource": "CreateAuthChallenge_Authentication", | ||
"request": { | ||
"userAttributes": { | ||
"sub": "<sub>", | ||
"cognito:user_status": "CONFIRMED", | ||
"phone_number_verified": "true", | ||
"cognito:phone_number_alias": "+12223334455", | ||
"phone_number": "+12223334455" | ||
}, | ||
"challengeName": "CUSTOM_CHALLENGE", | ||
"session": [ | ||
{ | ||
"challengeName": "PASSWORD_VERIFIER", | ||
"challengeResult": true, | ||
"challengeMetadata": "metadata" | ||
} | ||
], | ||
"clientMetadata": { | ||
"exampleMetadataKey": "example metadata value" | ||
}, | ||
"userNotFound": true | ||
}, | ||
"response": { | ||
"publicChallengeParameters": { | ||
"a": "b" | ||
}, | ||
"privateChallengeParameters": { | ||
"c": "d" | ||
}, | ||
"challengeMetadata": "challengeMetadata" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...ts/src/fixtures/example-cognito-event-userpools-define-auth-challenge-user-not-found.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"version": "1", | ||
"region": "us-west-2", | ||
"userPoolId": "<userPoolId>", | ||
"userName": "<userName>", | ||
"callerContext": { | ||
"awsSdkVersion": "aws-sdk-unknown-unknown", | ||
"clientId": "<clientId>" | ||
}, | ||
"triggerSource": "DefineAuthChallenge_Authentication", | ||
"request": { | ||
"userAttributes": { | ||
"sub": "<sub>", | ||
"cognito:user_status": "CONFIRMED", | ||
"phone_number_verified": "true", | ||
"cognito:phone_number_alias": "+12223334455", | ||
"phone_number": "+12223334455" | ||
}, | ||
"session": [ | ||
{ | ||
"challengeName": "PASSWORD_VERIFIER", | ||
"challengeResult": true, | ||
"challengeMetadata": "metadata" | ||
} | ||
], | ||
"clientMetadata": { | ||
"exampleMetadataKey": "example metadata value" | ||
}, | ||
"userNotFound": true | ||
}, | ||
"response": { | ||
"challengeName": "challengeName", | ||
"issueTokens": true, | ||
"failAuthentication": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...ts/src/fixtures/example-cognito-event-userpools-verify-auth-challenge-user-not-found.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"version": "1", | ||
"region": "us-west-2", | ||
"userPoolId": "<userPoolId>", | ||
"userName": "<userName>", | ||
"callerContext": { | ||
"awsSdkVersion": "aws-sdk-unknown-unknown", | ||
"clientId": "<clientId>" | ||
}, | ||
"triggerSource": "VerifyAuthChallengeResponse_Authentication", | ||
"request": { | ||
"userAttributes": { | ||
"sub": "<sub>", | ||
"cognito:user_status": "CONFIRMED", | ||
"phone_number_verified": "true", | ||
"cognito:phone_number_alias": "+12223334455", | ||
"phone_number": "+12223334455" | ||
}, | ||
"privateChallengeParameters": { | ||
"secret": "11122233" | ||
}, | ||
"challengeAnswer": "123xxxx", | ||
"clientMetadata": { | ||
"exampleMetadataKey": "example metadata value" | ||
}, | ||
"userNotFound": true | ||
}, | ||
"response": { | ||
"answerCorrect": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters