thrownewFido2VerificationException("json valuetype must be string");
try
{
ret=Base64Url.Decode((string)reader.Value);
}
catch(FormatExceptionex)
{
thrownewFido2VerificationException("json value must be valid base64 encoded string",ex);
}
returnret;
}
}
publicclassDescriptorClass
{
publicDescriptorClass(byte[]credentialId)
{
Id=credentialId;
}
publicDescriptorClass()
{
}
/// <summary>
/// This member contains the type of the public key credential the caller is referring to.
/// </summary>
[JsonProperty("type")]
publicstringType{get;set;}="public-key";
/// <summary>
/// This member contains the credential ID of the public key credential the caller is referring to.
/// </summary>
[JsonConverter(typeof(Base64UrlConverter))]
[JsonProperty("id")]
publicbyte[]Id{get;set;}
/// <summary>
/// This OPTIONAL member contains a hint as to how the client might communicate with the managing authenticator of the public key credential the caller is referring to.