-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathPasskeyConfig.cs
More file actions
96 lines (50 loc) · 3.52 KB
/
Copy pathPasskeyConfig.cs
File metadata and controls
96 lines (50 loc) · 3.52 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
namespace NpgsqlRestClient.Fido2;
public class PasskeyConfig
{
public bool Enabled { get; set; }
public bool EnableRegister { get; set; }
public string? RateLimiterPolicy { get; set; }
public string? ConnectionName { get; set; }
public string? CommandRetryStrategy { get; set; } = "default";
public string? RelyingPartyId { get; set; }
public string? RelyingPartyName { get; set; }
public string[] RelyingPartyOrigins { get; set; } = [];
public string? AddPasskeyOptionsPath { get; set; } = "/api/passkey/add/options";
public string? RegistrationOptionsPath { get; set; } = "/api/passkey/register/options";
public string? AddPasskeyPath { get; set; } = "/api/passkey/add";
public string? RegistrationPath { get; set; } = "/api/passkey/register";
public string? LoginOptionsPath { get; set; } = "/api/passkey/login/options";
public string? LoginPath { get; set; } = "/api/passkey/login";
public int ChallengeTimeoutMinutes { get; set; } = 5;
public string UserVerificationRequirement { get; set; } = "preferred";
public string ResidentKeyRequirement { get; set; } = "preferred";
public string AttestationConveyance { get; set; } = "none";
// GROUP 1: Challenge Commands (create challenges for all scenarios)
public string ChallengeAddExistingUserCommand { get; set; } = "select * from passkey_challenge_add_existing($1,$2)";
public string ChallengeRegistrationCommand { get; set; } = "select * from passkey_challenge_registration($1)";
public string ChallengeAuthenticationCommand { get; set; } = "select * from passkey_challenge_authentication($1,$2)";
// GROUP 2: Challenge Verify Command (used by ALL scenarios)
public string VerifyChallengeCommand { get; set; } = "select * from passkey_verify_challenge($1,$2)";
public bool ValidateSignCount { get; set; } = true;
// GROUP 3: Authentication Data Command (used only by authentication)
public string AuthenticateDataCommand { get; set; } = "select * from passkey_authenticate_data($1)";
// GROUP 4: Complete Commands (finalize each scenario)
public string CompleteAddExistingUserCommand { get; set; } = "select * from passkey_complete_add_existing($1,$2,$3,$4,$5,$6,$7,$8)";
public string CompleteRegistrationCommand { get; set; } = "select * from passkey_complete_registration($1,$2,$3,$4,$5,$6,$7,$8)";
public string CompleteAuthenticateCommand { get; set; } = "select * from passkey_complete_authenticate($1,$2,$3,$4)";
// Column name configuration for database responses
public string StatusColumnName { get; set; } = "status";
public string MessageColumnName { get; set; } = "message";
public string ChallengeColumnName { get; set; } = "challenge";
public string ChallengeIdColumnName { get; set; } = "challenge_id";
public string UserNameColumnName { get; set; } = "user_name";
public string UserDisplayNameColumnName { get; set; } = "user_display_name";
public string UserHandleColumnName { get; set; } = "user_handle";
public string ExcludeCredentialsColumnName { get; set; } = "exclude_credentials";
public string AllowCredentialsColumnName { get; set; } = "allow_credentials";
public string PublicKeyColumnName { get; set; } = "public_key";
public string PublicKeyAlgorithmColumnName { get; set; } = "public_key_algorithm";
public string SignCountColumnName { get; set; } = "sign_count";
public string UserContextColumnName { get; set; } = "user_context";
public string? ClientAnalyticsIpKey { get; set; } = "ip";
}