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(auth): Expose AuthConfiguration directly #2740

Merged
merged 8 commits into from
Apr 1, 2024

Conversation

mattcreaser
Copy link
Member

@mattcreaser mattcreaser commented Mar 18, 2024

  • PR title and description conform to Pull Request guidelines.

Issue #, if available:

Description of changes:
Amplify previously exposed raw JSON via getPluginConfiguration for Authenticator to consume. This change instead exposed a pre-parsed AuthConfiguration.

  • Added signupAttributes, usernameAttributes, verificationMechanisms, and passwordProtectionSettings to AuthConfiguration
  • Exposed AuthConfiguration and related types with @InternalAmplifyApi annotations.
  • Deprecated existing getPluginConfiguration function.
  • Moved AuthConfiguration to com.amplifyframework.auth.cognito package. This is a more appropriate location for this class.

Equivalent Swift PR is here: aws-amplify/amplify-swift#3566

How did you test these changes?

  • Tested consuming new internal API in Authenticator

Documentation update required?

  • No
  • Yes (Please include a PR link for the documentation update)

General Checklist

  • Added Unit Tests
  • Added Integration Tests
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mattcreaser mattcreaser requested a review from a team as a code owner March 18, 2024 18:34
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 84.21053% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 43.02%. Comparing base (b448ecc) to head (09727c9).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2740      +/-   ##
==========================================
+ Coverage   42.92%   43.02%   +0.10%     
==========================================
  Files         905      905              
  Lines       29127    29178      +51     
  Branches     4144     4152       +8     
==========================================
+ Hits        12503    12555      +52     
+ Misses      15268    15265       -3     
- Partials     1356     1358       +2     

@tylerjroach
Copy link
Member

Looks good, but thoughts on removing the Java style builders since those are all internal?

@mattcreaser
Copy link
Member Author

The builders are only used from tests and could be removed, but I'd do that separately to avoid bloating this PR.

@mattcreaser mattcreaser enabled auto-merge (squash) April 1, 2024 14:38
@mattcreaser mattcreaser merged commit 30a288e into main Apr 1, 2024
3 checks passed
@mattcreaser mattcreaser deleted the mattcreaser/auth-configuration-for-authenticator branch April 1, 2024 15:11
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.

4 participants