-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cognito): support for ALLOW_USER_AUTH explicit auth flow (#32273)
### Reason for this change Cognito [released some new auth flow features](https://aws.amazon.com/blogs/aws/improve-your-app-authentication-workflow-with-new-amazon-cognito-features/) which have [made their way into cloudformation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-explicitauthflows). I want to be able to use the new `USER_AUTH` sign in on a `UserPoolClient`. ### Description of changes I've added a `user` option to the `AuthFlow` struct for `UserPoolClient`. This naming matches the naming convention for the other settings in `AuthFlow` so while `user` is a very generic label, I think it makes sense in the context of this `AuthFlow` struct. i.e. the current properties are: ``` adminUserPassword -> ADMIN_USER_PASSWORD_AUTH custom -> CUSTOM_AUTH userPassword -> USER_PASSWORD_AUTH userSrp -> USER_SRP_AUTH ``` This property then sets the `"ALLOW_USER_AUTH"` value in the `ExplicitAuthFlows` of the `UserPoolClient`. ### Description of how you validated changes I added the setting to both the unit and integration tests which have all auth types enabled. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* Co-authored-by: GZ <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
935c06f
commit c5bcfdc
Showing
6 changed files
with
16 additions
and
0 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
1 change: 1 addition & 0 deletions
1
...k-integ/test/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/tree.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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