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

List<PublicKeyCredentialDescriptor>/IEnumerable<PublicKeyCredentialDescriptor> to IReadOnlyList<PublicKeyCredentialDescriptor> #447

Merged
merged 10 commits into from Dec 22, 2023

Conversation

joegoldman2
Copy link
Contributor

Fixes #191.

The proposal in the issue was to change AllowCredentials to List<PublicKeyCredentialDescriptor>, I preferred to do the opposite because I think it's better to expose interfaces.

There are other parameters that deserve to be changed to IEnumerable as well, such as storedDevicePublicKeys:

List<byte[]> storedDevicePublicKeys,

I could do a PR for the others if this one is approved and merged.

@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (5e5f289) 73.88% compared to head (c456ee5) 73.92%.

Files Patch % Lines
Src/Fido2.Models/CredentialCreateOptions.cs 50.00% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #447      +/-   ##
==========================================
+ Coverage   73.88%   73.92%   +0.03%     
==========================================
  Files          99       99              
  Lines        2711     2711              
  Branches      445      443       -2     
==========================================
+ Hits         2003     2004       +1     
  Misses        603      603              
+ Partials      105      104       -1     

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

@iamcarbon
Copy link
Sponsor Contributor

I would prefer IReadOnlyList to IEnumerable here.

@joegoldman2 joegoldman2 changed the title Change excludeCredentials from List<PublicKeyCredentialDescriptor> to IEnumerable<PublicKeyCredentialDescriptor> List<PublicKeyCredentialDescriptor>/IEnumerable<PublicKeyCredentialDescriptor> to IReadOnlyList<PublicKeyCredentialDescriptor> Oct 26, 2023
Copy link
Collaborator

@abergs abergs left a comment

Choose a reason for hiding this comment

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

Aside from my question about not using null or different init values, It's Approved 👍

Src/Fido2.Models/AssertionOptions.cs Outdated Show resolved Hide resolved
Src/Fido2.Models/CredentialCreateOptions.cs Outdated Show resolved Hide resolved
Src/Fido2.Models/CredentialCreateOptions.cs Outdated Show resolved Hide resolved
@abergs
Copy link
Collaborator

abergs commented Nov 29, 2023

@iamcarbon Do you have any comments regarding the allocations?

@iamcarbon
Copy link
Sponsor Contributor

Looks good to me! 👍

@abergs abergs merged commit 43e2cd3 into passwordless-lib:master Dec 22, 2023
11 checks passed
@joegoldman2 joegoldman2 deleted the fix/191 branch December 22, 2023 21:29
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.

Minor inconsistency between AllowCredentials and ExcludeCredentials
6 participants