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

Wrap arguments into classes #556

Merged
merged 5 commits into from
Oct 28, 2024
Merged

Wrap arguments into classes #556

merged 5 commits into from
Oct 28, 2024

Conversation

abergs
Copy link
Collaborator

@abergs abergs commented Oct 18, 2024

Reason: In order to make arguments more readable and future API changes less likely to cause binary breaking changes to everyone we're moving many arguments into wrapping classes.

In this PR the classes are suffixed with Params, instead of popular Options/Request to avoid adding confusion as those terms are used elsewhere as part of webauthn.

@abergs
Copy link
Collaborator Author

abergs commented Oct 18, 2024

I haven't fully reviewed this myself, but pinging @iamcarbon fyi.

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.72%. Comparing base (72f5a36) to head (fa91b0f).

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #556      +/-   ##
==========================================
+ Coverage   74.62%   74.72%   +0.10%     
==========================================
  Files         101      103       +2     
  Lines        2719     2730      +11     
  Branches      464      464              
==========================================
+ Hits         2029     2040      +11     
  Misses        581      581              
  Partials      109      109              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abergs
Copy link
Collaborator Author

abergs commented Oct 28, 2024

@iamcarbon Please feel free to feedback on this.

Copy link
Contributor

@iamcarbon iamcarbon left a comment

Choose a reason for hiding this comment

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

This is a nice improvement, and gives us some needed flexibility as the Fido2 & WebAuthN specifications continue to evolve.

I don't love the Params postfix, but agree with the reasoning to go against the .NET convention.

Just a couple nits on descriptions, line breaks, and property visibility that can be improved anytime.

Src/Fido2/Fido2.cs Outdated Show resolved Hide resolved
Src/Fido2/MakeAssertionParams.cs Outdated Show resolved Hide resolved
Src/Fido2/MakeNewCredentialParams.cs Show resolved Hide resolved
Src/Fido2/Fido2.cs Outdated Show resolved Hide resolved
@abergs abergs merged commit b2e7c15 into master Oct 28, 2024
11 checks passed
@abergs abergs deleted the wrap-arguments branch October 28, 2024 19:39
@abergs abergs added this to the Version 4 milestone Oct 29, 2024
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.

3 participants