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
, but will never be anything else then { status = "ok" } and errorMessage = null despite the sample indicating otherwise. MakeAssertionAsync() will always throw on error, which is okay, but should be clearly communicated.
the VerifyAssertionResult.Status property is of type string and is neither populated by an enum nor by an constant, so if that property is relevant, the caller needs to read the code to understand the possible values.
I propose:
removing the inheritance of VerifyAssertionResult to Fido2ResponseBase since that brings in the two problematic fields.
adding a bool to VerifyAssertionResult indicating successful verification and thus remove all throws and replace it with return VerifiyAssertionResult.Error(string reason) setting that bool to false (or an enum indicating success and failure to make it clearly distinguishable).
If you'd accept the Idea, I'd implement it and provide a PR.
The text was updated successfully, but these errors were encountered:
I followed the Fido2ResponseBase.Status and currently there's only one line of demo code, where the Property takes another value than "Ok" - I think the property is most misleading as such.
Same goes for the errorMessage - it's always empty. Fido2ResponseBase seems not to be used in any meaningful way and should as such be removed.
The function
fido2-net-lib/Src/Fido2/IFido2.cs
Line 16 in 9ad038b
IFido2.MakeAssertionAsync()
returns an instance ofVerifyAssertionResult
. This leads to questions and some confusion about how to use it:fido2-net-lib/BlazorWasmDemo/Server/Controllers/UserController.cs
Line 284 in 9ad038b
{ status = "ok" }
anderrorMessage = null
despite the sample indicating otherwise.MakeAssertionAsync()
will always throw on error, which is okay, but should be clearly communicated.VerifyAssertionResult.Status
property is of type string and is neither populated by an enum nor by an constant, so if that property is relevant, the caller needs to read the code to understand the possible values.I propose:
VerifyAssertionResult
toFido2ResponseBase
since that brings in the two problematic fields.VerifyAssertionResult
indicating successful verification and thus remove all throws and replace it with returnVerifiyAssertionResult.Error(string reason)
setting that bool to false (or an enum indicating success and failure to make it clearly distinguishable).If you'd accept the Idea, I'd implement it and provide a PR.
The text was updated successfully, but these errors were encountered: