You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would be really helpful to annotate the nullability of the Fido2.Models types. In other words, to set <Nullable>enable</Nullable> in the Fido2.Models project.
This way, it would become clear for FIDO2 newbies to understand which information is optional and which one is required.
For example, in the demo, you have a line of code that stores a credential coming from MakeNewCredentialAsync:
DevicePublicKeys = new List<byte[]>() { success.Result.DevicePublicKey }
If both Fido2.Models and Demo were NRT enabled, this would pop up as a compilation error. Righteously so, because I don't think it make sense to store a list containing a null along the credential. So in this example, it would really help if RegisteredPublicKeyCredential.DevicePubliKey was declared as byte[]?. And I assume there's plenty more.
The text was updated successfully, but these errors were encountered:
We can't use required members yet (the net6.0 system.text.json source generator doesn't support them) -- so there's no clean way to annotate non-null members in the models library right now.
We should, however, continue to annotate nullable members inside of #nullable enable blocks. If we drop net6.0 when it goes out of support, it should be trivial to annotate the remaining members.
Yes. I guess the first step should be to have <Nullable>enable</Nullable> in the Fido2.Models project (just as you already have it in the Fido2 project). This issue is about that.
And then in a later step, the require keyword can be used to make sure that props are correctly initialized.
`
I would be really helpful to annotate the nullability of the
Fido2.Models
types. In other words, to set<Nullable>enable</Nullable>
in theFido2.Models
project.This way, it would become clear for FIDO2 newbies to understand which information is optional and which one is required.
For example, in the demo, you have a line of code that stores a credential coming from
MakeNewCredentialAsync
:If both
Fido2.Models
andDemo
were NRT enabled, this would pop up as a compilation error. Righteously so, because I don't think it make sense to store a list containing anull
along the credential. So in this example, it would really help ifRegisteredPublicKeyCredential.DevicePubliKey
was declared asbyte[]?
. And I assume there's plenty more.The text was updated successfully, but these errors were encountered: