-
-
Notifications
You must be signed in to change notification settings - Fork 182
/
Copy pathAuthenticatorAssertionRawResponse.cs
58 lines (46 loc) · 1.69 KB
/
AuthenticatorAssertionRawResponse.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#nullable disable
using System.Text.Json.Serialization;
using Fido2NetLib.Objects;
namespace Fido2NetLib;
/// <summary>
/// Transport class for AssertionResponse
/// </summary>
public class AuthenticatorAssertionRawResponse
{
[JsonConverter(typeof(Base64UrlConverter))]
[JsonPropertyName("id")]
public byte[] Id { get; set; }
// might be wrong to base64url encode this...
[JsonConverter(typeof(Base64UrlConverter))]
[JsonPropertyName("rawId")]
public byte[] RawId { get; set; }
[JsonPropertyName("response")]
public AssertionResponse Response { get; set; }
[JsonPropertyName("type")]
public PublicKeyCredentialType? Type { get; set; }
[JsonPropertyName("extensions")]
[Obsolete("Use ClientExtensionResults instead")]
public AuthenticationExtensionsClientOutputs Extensions
{
get => ClientExtensionResults;
set => ClientExtensionResults = value;
}
[JsonPropertyName("clientExtensionResults")]
public AuthenticationExtensionsClientOutputs ClientExtensionResults { get; set; }
public sealed class AssertionResponse
{
[JsonConverter(typeof(Base64UrlConverter))]
[JsonPropertyName("authenticatorData")]
public byte[] AuthenticatorData { get; set; }
[JsonConverter(typeof(Base64UrlConverter))]
[JsonPropertyName("signature")]
public byte[] Signature { get; set; }
[JsonConverter(typeof(Base64UrlConverter))]
[JsonPropertyName("clientDataJSON")]
public byte[] ClientDataJson { get; set; }
#nullable enable
[JsonPropertyName("userHandle")]
[JsonConverter(typeof(Base64UrlConverter))]
public byte[]? UserHandle { get; set; }
}
}