Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cognito): refresh modeling of import APIs, sign in & autoverified attrs #6422

Merged
merged 4 commits into from
Feb 26, 2020

Conversation

nija-at
Copy link
Contributor

@nija-at nija-at commented Feb 24, 2020

The awslint rule exclusion no-unused-type:@aws-cdk/aws-cognito.UserPoolAttribute is temporary and will be removed in a subsequent PR.


Commit Message

feat(cognito): refresh modeling of import APIs, sign in & autoverified attrs (#6422)

  • Switch to import UserPool based on ARN and Id.

  • IUserPool no longer defines provider information as members.

  • Rename SignInType to SignInAliases. Switch from an enum to an
    interface for better modeling. The CDK automatically figures out
    which ones are primary sign in attributes, and which ones are
    aliases.

  • autoVerifiedAttributes property is now renamed to autoVerify with
    a modified type - AutoVerifiedAttrs. The attributes to auto-verify
    are computed automatically based on the value specified in
    SignInAliases unless explicitly specified.

BREAKING CHANGE: UserPool.fromUserPoolAttributes() has been replaced
by fromUserPoolId() and fromUserPoolArn().

  • cognito: IUserPool no longer contains userPoolProviderName
    and userPoolProviderUrl.
  • cognito: The property signInType of UserPool has been
    renamed to signInAliases and given a new type SignInAliases. The
    list of sign in types are now specified via boolean properties.
  • cognito: The property usernameAliasAttributes of UserPool has
    been dropped and its functionality merged with the signInAliases
    property.
  • cognito: The property autoVerifiedAttributes for UserPool is
    now renamed to autoVerify and its default has now changed. The new
    default is now determined by the value of signInAliases.

…d attrs

* Switch to import UserPool based on ARN and Id.

* IUserPool no longer defines provider information as members.

* Rename `SignInType` to `SignInAlias`. Adjust its members so it's
  clearer on the options available. The CDK automatically figures out
  which ones are primary sign in attributes, and which ones are aliases.

* `autoVerifiedAttributes` has a new type - `AutoVerifiedAttrs` -
  instead of the overall UserPoolAttribute. The attributes to
  auto-verify are computed automatically based on the value specified
  in `SignInAlias` unless explicitly specified.

BREAKING CHANGES:
* `UserPool.fromUserPoolAttributes()` has been replaced by
  `fromUserPoolId()` and `fromUserPoolArn()`.
* `IUserPool` no longer contains `userPoolProviderName` and
  `userPoolProviderUrl`.
* `SignInType` has been removed and replaced by `SignInAlias`. While
  most of the attributes are retained as is, the attribute
  `EMAIL_OR_PHONE` has been dropped and `PREFERRED_USERNAME` has been
  added.
* The property `signInType` has been removed and replaced by
  `signInAliases`. This is now a list of type `SignInAlias`.
* The property `usernameAliasAttributes` has been dropped and its
  functionality merged with the `signInAliases` property.
* default has changed for the `autoVerifiedAttributes` property for a
  UserPool.
@nija-at nija-at self-assigned this Feb 24, 2020
@nija-at nija-at requested a review from a team February 24, 2020 17:09
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 24, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: d2a01fa
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the instructions here for the syntax for writing multi-line BREAKING CHANGES. Otherwise our CHANGELOG is going to be corrupted

packages/@aws-cdk/aws-cognito/README.md Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-cognito/README.md Outdated Show resolved Hide resolved
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: a44a5f3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please fix the breaking changes section per my previous comment

@mergify
Copy link
Contributor

mergify bot commented Feb 26, 2020

Thank you for contributing! Your pull request is now being automatically merged.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: f770260
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Feb 26, 2020

Thank you for contributing! Your pull request is now being automatically merged.

@mergify mergify bot merged commit c02e852 into master Feb 26, 2020
@mergify mergify bot deleted the nija-at/cognito-userpool-part2 branch February 26, 2020 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants