Skip to content

Comments

fix: clean cognito builders#19

Merged
edgarfgp merged 3 commits intomainfrom
fix-cognito-builder
Nov 30, 2025
Merged

fix: clean cognito builders#19
edgarfgp merged 3 commits intomainfrom
fix-cognito-builder

Conversation

@edgarfgp
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the Cognito builders by migrating from low-level CloudFormation constructs (L1/Cfn) to higher-level CDK constructs (L2). The changes improve the API design and add comprehensive builder support for Cognito User Pool configuration.

  • Migrated UserPoolResourceServer from CfnUserPoolResourceServer to the L2 UserPoolResourceServer construct
  • Renamed the builder function from resourceServer to userPoolResourceServer for clarity
  • Added extensive builder support for User Pool configuration including password policies, sign-in aliases, auto-verified attributes, MFA settings, standard attributes, and Lambda triggers
  • Added Bind method for UserPoolClientSpec in the Stack builder to enable proper resource referencing
  • Updated tests and documentation to reflect the API changes

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/Cognito.fs Major refactoring: added 850+ lines of new builder implementations (PasswordPolicyBuilder, SignInAliasesBuilder, AutoVerifiedAttrsBuilder, MfaSecondFactorBuilder, StandardAttributesBuilder, UserPoolTriggersBuilder) and refactored UserPoolResourceServerBuilder to use L2 constructs with proper scope handling
src/Stack.fs Changed UserPoolResourceServer instantiation from CfnUserPoolResourceServer to UserPoolResourceServer (L2 construct) and added Bind method for UserPoolClientSpec to enable monadic composition
tests/CognitoTests.fs Updated tests to use userPoolResourceServer instead of resourceServer and fixed property accessor from Name to UserPoolResourceServerName to match L2 construct API
docs/cognito-m2m-oauth.fsx Updated documentation examples to use userPoolResourceServer builder name consistently

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@edgarfgp edgarfgp marked this pull request as ready for review November 30, 2025 12:30
@edgarfgp edgarfgp merged commit deca7ed into main Nov 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant