-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathAddLoginPasskey.cs
More file actions
58 lines (53 loc) · 1.97 KB
/
AddLoginPasskey.cs
File metadata and controls
58 lines (53 loc) · 1.97 KB
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
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;
// REUSE-IgnoreStart
namespace TdLib
{
/// <summary>
/// Autogenerated TDLib APIs
/// </summary>
public static partial class TdApi
{
/// <summary>
/// Adds a passkey allowed to be used for the login by the current user and returns the added passkey. Call getPasskeyParameters to get parameters for creating of the passkey
/// </summary>
public class AddLoginPasskey : Function<Passkey>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "addLoginPasskey";
/// <summary>
/// Extra data attached to the function
/// </summary>
[JsonProperty("@extra")]
public override string Extra { get; set; }
/// <summary>
/// JSON-encoded client data
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("client_data")]
public string ClientData { get; set; }
/// <summary>
/// Passkey attestation object
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("attestation_object")]
public byte[] AttestationObject { get; set; }
}
/// <summary>
/// Adds a passkey allowed to be used for the login by the current user and returns the added passkey. Call getPasskeyParameters to get parameters for creating of the passkey
/// </summary>
public static Task<Passkey> AddLoginPasskeyAsync(
this Client client, string clientData = default, byte[] attestationObject = default)
{
return client.ExecuteAsync(new AddLoginPasskey
{
ClientData = clientData, AttestationObject = attestationObject
});
}
}
}
// REUSE-IgnoreEnd