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
Migrate from Newtonsoft to System.Text.Json (#249)
* Migrate from Newtonsoft to System.Text.Json
* Add fast path for decoding UTF8-encoded Base64Url data
* Ensure x5c is an Array
* Add Async suffix to GetMetadataStatement
* Remove trailing spaces
* Add FidoEnumConverter test coverage
* Extend FidoEnumConverter test coverage
* [Demo] Use built-in System.Text.Json serializer
_log?.LogError(ex,"Error getting statement from {0} for AAGUID '{1}'.\nTOC entry:\n{2} ",repository.GetType().Name,entry.AaGuid,JsonConvert.SerializeObject(entry,Formatting.Indented));
207
+
_log?.LogError(ex,"Error getting statement from {0} for AAGUID '{1}'.\nTOC entry:\n{2} ",repository.GetType().Name,entry.AaGuid,JsonSerializer.Serialize(entry,newJsonSerializerOptions{WriteIndented=true}));
Copy file name to clipboardExpand all lines: Src/Fido2.Models/AssertionOptions.cs
+12-9Lines changed: 12 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
usingSystem.Collections.Generic;
2
+
usingSystem.Text.Json;
3
+
usingSystem.Text.Json.Serialization;
4
+
2
5
usingFido2NetLib.Objects;
3
-
usingNewtonsoft.Json;
4
6
5
7
namespaceFido2NetLib
6
8
{
@@ -12,38 +14,39 @@ public class AssertionOptions : Fido2ResponseBase
12
14
/// <summary>
13
15
/// This member represents a challenge that the selected authenticator signs, along with other data, when producing an authentication assertion.See the §13.1 Cryptographic Challenges security consideration.
14
16
/// </summary>
15
-
[JsonProperty("challenge")]
17
+
[JsonPropertyName("challenge")]
16
18
[JsonConverter(typeof(Base64UrlConverter))]
17
19
publicbyte[]Challenge{get;set;}
18
20
19
21
/// <summary>
20
22
/// This member specifies a time, in milliseconds, that the caller is willing to wait for the call to complete. This is treated as a hint, and MAY be overridden by the client.
21
23
/// </summary>
22
-
[JsonProperty("timeout")]
24
+
[JsonPropertyName("timeout")]
23
25
publicuintTimeout{get;set;}
24
26
25
27
/// <summary>
26
28
/// This OPTIONAL member specifies the relying party identifier claimed by the caller.If omitted, its value will be the CredentialsContainer object’s relevant settings object's origin's effective domain
27
29
/// </summary>
28
-
[JsonProperty("rpId")]
30
+
[JsonPropertyName("rpId")]
29
31
publicstringRpId{get;set;}
30
32
31
33
/// <summary>
32
34
/// This OPTIONAL member contains a list of PublicKeyCredentialDescriptor objects representing public key credentials acceptable to the caller, in descending order of the caller’s preference(the first item in the list is the most preferred credential, and so on down the list)
/// This member describes the Relying Party's requirements regarding user verification for the get() operation. Eligible authenticators are filtered to only those capable of satisfying this requirement
/// This OPTIONAL member contains additional parameters requesting additional processing by the client and authenticator. For example, if transaction confirmation is sought from the user, then the prompt string might be included as an extension.
0 commit comments