Skip to content

Make options de-/serializable by dotnet - #374

Closed
Regenhardt wants to merge 1 commit into
passwordless-lib:masterfrom
Regenhardt:feature/model-serialization
Closed

Regenhardt wants to merge 1 commit into
passwordless-lib:masterfrom
Regenhardt:feature/model-serialization

Conversation

@Regenhardt

Copy link
Copy Markdown
Contributor

closes #371

@Regenhardt

Copy link
Copy Markdown
Contributor Author

Turns out PubKeyCredParams are immutable so giving the serializer a default constructor stops the deserialization form setting the properties. Guess I have to find out more about the ConstructorContainsNullParameterNames thing.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #374 (68cc943) into master (5e72564) will increase coverage by 0.01%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #374      +/-   ##
==========================================
+ Coverage   76.80%   76.82%   +0.01%     
==========================================
  Files          89       89              
  Lines        2531     2533       +2     
  Branches      427      427              
==========================================
+ Hits         1944     1946       +2     
  Misses        466      466              
  Partials      121      121              
Impacted Files Coverage Δ
Src/Fido2.Models/CredentialCreateOptions.cs 43.18% <100.00%> (+1.32%) ⬆️

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

@Regenhardt
Regenhardt force-pushed the feature/model-serialization branch from 68cc943 to 1fbfb25 Compare February 4, 2023 21:20
@Regenhardt

Copy link
Copy Markdown
Contributor Author

Ok this one works correctly now, telling the linker that if we keep the ctor we wanna keep the whole ctor. Will definitely open an issue with Microsoft to check if this is planned behaviour or if the linker needs a fix.

@Regenhardt

Copy link
Copy Markdown
Contributor Author

Or should we rather add these changes to a new project, which would then also contain this js wrapper and this file, even though a bit cleaned up and with the nuget package actually adding the transpiled js file?

@Regenhardt

Copy link
Copy Markdown
Contributor Author

Something like Fido2.Blazor or Fido2.WebAssembly or Fido2.BlazorWebAssembly like the sdk.

@abergs

abergs commented Feb 7, 2023

Copy link
Copy Markdown
Collaborator

Yes, moving things into a Blazor project (and small demo) would be ideal for changes like these.

@Regenhardt

Copy link
Copy Markdown
Contributor Author

Since this became bigger as expected, I made a new branch: #379

@Regenhardt Regenhardt closed this Feb 16, 2023
@Regenhardt
Regenhardt deleted the feature/model-serialization branch February 16, 2023 20:08
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.

Deserializing in frontend: ctor gets trimmed

3 participants