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

Add support for attributes and precedence to ConnectionOptions & phone_number to SignupRequest. #991

Merged
merged 18 commits into from
Aug 20, 2024

Conversation

duedares-rvj
Copy link
Contributor

@duedares-rvj duedares-rvj commented Jul 23, 2024

🔧 Changes

  1. Added schema updates to ConnectionOptions and included attributes and precedence
  2. Added corresponding expand and flatten logic.
  3. Added relevant test cases to expand and flatten nested structs.

📚 References

Required changes have been made in line with the documentation here

Create a connection with attributes
Body Params: options-> attributes

🔬 Testing

make test FILTER= TestAccConnectionOptionsAttr

Relevant test cases and their recordings have been added to ensure changes as described above.
All created resources are cleaned up after the assertions are completed.

- Auth0ConnectionTestCase

  • Added a set of test cases to test various combinations of ConnectionOptions:
  • Auth0 Connection with PhoneNumber as Identifier
  • Auth0 Connection with Email as Identifier
  • Auth0 Connection with Username as Identifier
  • Auth0 Connection Cannot set both requires_username and attributes together
  • Auth0 Connection With No attribute is active
  • Auth0 Connection Cannot set both validation and attributes together
  • Auth0 Connection need PhoneNumber on signup but set to inactive on verification

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 18 lines in your changes missing coverage. Please review.

Project coverage is 90.38%. Comparing base (3616a04) to head (3d9d2f5).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
internal/auth0/connection/flatten.go 82.17% 12 Missing and 6 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #991      +/-   ##
==========================================
+ Coverage   90.28%   90.38%   +0.10%     
==========================================
  Files         105      105              
  Lines       14126    14341     +215     
==========================================
+ Hits        12753    12962     +209     
- Misses        975      978       +3     
- Partials      398      401       +3     
Files with missing lines Coverage Δ
internal/auth0/connection/expand.go 93.22% <100.00%> (+0.92%) ⬆️
internal/auth0/connection/flatten.go 80.39% <82.17%> (+0.22%) ⬆️

... and 3 files with indirect coverage changes

@acwest acwest force-pushed the add-precedence-to-connection-options branch 2 times, most recently from 4be951a to 72ab1d3 Compare August 6, 2024 15:48
internal/auth0/connection/flatten.go Outdated Show resolved Hide resolved
internal/auth0/connection/flatten.go Show resolved Hide resolved
internal/auth0/connection/flatten.go Outdated Show resolved Hide resolved
internal/auth0/connection/flatten.go Outdated Show resolved Hide resolved
internal/auth0/connection/flatten.go Outdated Show resolved Hide resolved
internal/auth0/connection/flatten.go Outdated Show resolved Hide resolved
internal/auth0/connection/flatten.go Outdated Show resolved Hide resolved
internal/auth0/connection/flatten.go Outdated Show resolved Hide resolved
internal/auth0/connection/flatten.go Outdated Show resolved Hide resolved
internal/auth0/connection/expand.go Outdated Show resolved Hide resolved
@duedares-rvj duedares-rvj marked this pull request as ready for review August 6, 2024 16:15
@duedares-rvj duedares-rvj requested a review from a team as a code owner August 6, 2024 16:15
@duedares-rvj duedares-rvj force-pushed the add-precedence-to-connection-options branch from 8a16e38 to b27e4a3 Compare August 7, 2024 10:19
acwest
acwest previously approved these changes Aug 7, 2024
@acwest acwest force-pushed the add-precedence-to-connection-options branch from 970a315 to 24830fb Compare August 7, 2024 16:38
@duedares-rvj duedares-rvj self-assigned this Aug 7, 2024
@duedares-rvj duedares-rvj requested a review from acwest August 7, 2024 17:09
acwest
acwest previously approved these changes Aug 7, 2024
developerkunal
developerkunal previously approved these changes Aug 8, 2024
@acwest acwest dismissed stale reviews from developerkunal and themself via 079e7e4 August 8, 2024 21:39
@acwest acwest requested a review from developerkunal August 8, 2024 21:43
@duedares-rvj duedares-rvj changed the title Added schema updates on connection module, along with corresponding expand/flatten changes Add support for attributes and precedence to ConnectionOptions & phone_number to SignupRequest. Aug 20, 2024
@acwest acwest merged commit 1d8a8e8 into main Aug 20, 2024
8 checks passed
@acwest acwest deleted the add-precedence-to-connection-options branch August 20, 2024 15:54
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