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

Issue 388: relax validation rules on initiate_login_uri to match API #389

Merged
merged 3 commits into from
Nov 5, 2022

Conversation

mlni
Copy link
Contributor

@mlni mlni commented Nov 3, 2022

🔧 Changes

This PR relaxes the validation rules on initiate_login_uri field on auth0_client resource to match what the Auth0 API accepts.

📚 References

🔬 Testing

Tested locally by adding a URL containing a fragment to initiate_login_uri and verifying that it both passes validation and actually applies to a client on Auth0.

📝 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)

@mlni mlni requested a review from a team as a code owner November 3, 2022 09:35
@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2022

Codecov Report

Base: 86.74% // Head: 86.74% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (d6fe8fb) compared to base (eeffc4b).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #389      +/-   ##
==========================================
- Coverage   86.74%   86.74%   -0.01%     
==========================================
  Files          41       41              
  Lines        8730     8727       -3     
==========================================
- Hits         7573     7570       -3     
  Misses        890      890              
  Partials      267      267              
Impacted Files Coverage Δ
internal/provider/resource_auth0_client.go 97.16% <100.00%> (-0.02%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@sergiught sergiught left a comment

Choose a reason for hiding this comment

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

Appreciate the contribution @mlni 💯 , everything's looking good, just left a tiny comment to clean up the code a little bit more after we remove the fragment validation.

@@ -610,7 +608,6 @@ func newClient() *schema.Resource {
Optional: true,
ValidateFunc: validation.All(
Copy link
Contributor

Choose a reason for hiding this comment

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

Considering now we only have 1 validation, let's skip using the validation.All and simply replace it with validation.IsURLWithHTTPS 🙏🏻

Suggested change
ValidateFunc: validation.All(
ValidateFunc: validation.IsURLWithHTTPS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair point, fixed it.

Copy link
Contributor

@sergiught sergiught left a comment

Choose a reason for hiding this comment

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

🤝 Thanks a lot for the contribution @mlni 💯 !!

@sergiught sergiught merged commit 45c58be into auth0:main Nov 5, 2022
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.

None yet

3 participants