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
/// If this member is present, eligible authenticators are filtered to only authenticators attached with the specified §5.4.5 Authenticator Attachment enumeration (enum AuthenticatorAttachment).
190
+
/// If this member is present, eligible authenticators are filtered to only authenticators attached with the specified §5.4.5 Authenticator Attachment Enumeration (enum AuthenticatorAttachment).
/// Specifies the extent to which the Relying Party desires to create a client-side discoverable credential. For historical reasons the naming retains the deprecated “resident” terminology. The value SHOULD be a member of ResidentKeyRequirement but client platforms MUST ignore unknown values, treating an unknown value as if the member does not exist. If no value is given then the effective value is required if requireResidentKey is true or discouraged if it is false or absent.
199
+
/// Specifies the extent to which the Relying Party desires to create a client-side discoverable credential.
200
+
/// For historical reasons the naming retains the deprecated “resident” terminology.
201
+
/// The value SHOULD be a member of ResidentKeyRequirement but client platforms MUST ignore unknown values,
202
+
/// treating an unknown value as if the member does not exist.
203
+
/// If no value is given then the effective value is required if requireResidentKey is true or discouraged if it is false or absent.
198
204
/// </summary>
199
205
[JsonPropertyName("residentKey")]
200
206
publicResidentKeyRequirementResidentKey
@@ -207,12 +213,13 @@ public ResidentKeyRequirement ResidentKey
207
213
{
208
214
ResidentKeyRequirement.Required=>true,
209
215
ResidentKeyRequirement.Preferred or ResidentKeyRequirement.Discouraged=>false,
210
-
_ =>thrownewNotImplementedException(),
216
+
_ =>thrownewNotImplementedException()
211
217
};
212
218
}
213
219
}
214
220
215
221
privatebool_requireResidentKey;
222
+
216
223
/// <summary>
217
224
/// This member describes the Relying Parties' requirements regarding resident credentials. If the parameter is set to true, the authenticator MUST create a client-side-resident public key credential source when creating a public key credential.
218
225
/// </summary>
@@ -245,20 +252,25 @@ public bool RequireResidentKey
245
252
publicclassFido2User
246
253
{
247
254
/// <summary>
248
-
/// Required. A human-friendly identifier for a user account. It is intended only for display, i.e., aiding the user in determining the difference between user accounts with similar displayNames. For example, "alexm", "[email protected]" or "+14255551234". https://w3c.github.io/webauthn/#dictdef-publickeycredentialentity
255
+
/// Required. A human-friendly identifier for a user account.
256
+
/// It is intended only for display, i.e., aiding the user in determining the difference between user accounts with similar displayNames.
257
+
/// For example, "alexm", "[email protected]" or "+14255551234". https://w3c.github.io/webauthn/#dictdef-publickeycredentialentity
249
258
/// </summary>
250
259
[JsonPropertyName("name")]
251
260
publicstringName{get;set;}
252
261
253
262
/// <summary>
254
-
/// The user handle of the user account entity. To ensure secure operation, authentication and authorization decisions MUST be made on the basis of this id member, not the displayName nor name members
263
+
/// The user handle of the user account entity.
264
+
/// To ensure secure operation, authentication and authorization decisions MUST be made on the basis of this id member, not the displayName nor name members
255
265
/// </summary>
256
266
[JsonPropertyName("id")]
257
267
[JsonConverter(typeof(Base64UrlConverter))]
258
268
publicbyte[]Id{get;set;}
259
269
260
270
/// <summary>
261
-
/// A human-friendly name for the user account, intended only for display. For example, "Alex P. Müller" or "田中 倫". The Relying Party SHOULD let the user choose this, and SHOULD NOT restrict the choice more than necessary.
271
+
/// A human-friendly name for the user account, intended only for display.
272
+
/// For example, "Alex P. Müller" or "田中 倫".
273
+
/// The Relying Party SHOULD let the user choose this, and SHOULD NOT restrict the choice more than necessary.
Copy file name to clipboardExpand all lines: Src/Fido2.Models/Objects/AuthenticatorAttachment.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ namespace Fido2NetLib.Objects;
10
10
/// </summary>
11
11
/// <remarks>
12
12
/// Note: An authenticator attachment modality selection option is available only in the [[Create]](origin, options, sameOriginWithAncestors) operation. The Relying Party may use it to, for example, ensure the user has a roaming credential for authenticating on another client device; or to specifically register a platform credential for easier reauthentication using a particular client device. The [[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors) operation has no authenticator attachment modality selection option, so the Relying Party SHOULD accept any of the user’s registered credentials. The client and user will then use whichever is available and convenient at the time.
Copy file name to clipboardExpand all lines: Src/Fido2.Models/Objects/AuthenticatorTransport.cs
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,12 @@
4
4
namespaceFido2NetLib.Objects;
5
5
6
6
/// <summary>
7
-
/// Authenticators may implement various transports for communicating with clients. This enumeration defines hints as to how clients might communicate with a particular authenticator in order to obtain an assertion for a specific credential. Note that these hints represent the WebAuthn Relying Party's best belief as to how an authenticator may be reached. A Relying Party may obtain a list of transports hints from some attestation statement formats or via some out-of-band mechanism; it is outside the scope of this specification to define that mechanism.
8
-
/// https://w3c.github.io/webauthn/#transport
7
+
/// Authenticators may implement various transports for communicating with clients.
8
+
/// This enumeration defines hints as to how clients might communicate with a particular
9
+
/// authenticator in order to obtain an assertion for a specific credential.
10
+
/// Note that these hints represent the WebAuthn Relying Party's best belief as to how an authenticator may be reached.
11
+
/// A Relying Party will typically learn of the supported transports for a public key credential via getTransports().
@@ -23,13 +27,14 @@ public enum AuthenticatorTransport
23
27
Nfc,
24
28
25
29
/// <summary>
26
-
/// Indicates the respective authenticator can be contacted over Bluetooth Smart(Bluetooth Low Energy / BLE)
30
+
/// Indicates the respective authenticator can be contacted over Bluetooth Smart(Bluetooth Low Energy / BLE).
27
31
/// </summary>
28
32
[EnumMember(Value="ble")]
29
33
Ble,
30
34
31
35
/// <summary>
32
-
/// Indicates the respective authenticator is contacted using a client device-specific transport.These authenticators are not removable from the client device.
36
+
/// Indicates the respective authenticator is contacted using a client device-specific transport, i.e., it is a platform authenticator.
37
+
/// These authenticators are not removable from the client device.
Copy file name to clipboardExpand all lines: Src/Fido2.Models/Objects/ResidentKeyRequirement.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ namespace Fido2NetLib.Objects;
5
5
6
6
/// <summary>
7
7
/// This enumeration’s values describe the Relying Party's requirements for client-side discoverable credentials (formerly known as resident credentials or resident keys).
/// This value indicates that the Relying Party requires user verification for the operation and will fail the operation if the response does not have the UV flag set.
15
+
/// This value indicates that the Relying Party requires user verification for the operation
16
+
/// and will fail the operation if the response does not have the UV flag set.
15
17
/// </summary>
16
18
[EnumMember(Value="required")]
17
19
Required,
18
20
19
21
/// <summary>
20
-
/// This value indicates that the Relying Party prefers user verification for the operation if possible, but will not fail the operation if the response does not have the UV flag set.
22
+
/// This value indicates that the Relying Party prefers user verification for the operation if possible,
23
+
/// but will not fail the operation if the response does not have the UV flag set.
21
24
/// </summary>
22
25
[EnumMember(Value="preferred")]
23
26
Preferred,
24
27
25
28
/// <summary>
26
-
/// This value indicates that the Relying Party does not want user verification employed during the operation(e.g., in the interest of minimizing disruption to the user interaction flow).
29
+
/// This value indicates that the Relying Party does not want user verification employed during the operation
30
+
/// (e.g., in the interest of minimizing disruption to the user interaction flow).
/// <param name="ignoreCase">ignores the case when comparing values.</param>
14
13
/// <returns>TEnum.</returns>
15
14
/// <exception cref="ArgumentException">No XmlEnumAttribute code exists for type " + typeof(TEnum).ToString() + " corresponding to value of " + value</exception>
thrownewArgumentException($"Value '{value}' is not a valid enum name of '{typeof(TEnum)}' ({nameof(ignoreCase)}={ignoreCase}). Valid values are: {string.Join(", ",EnumNameMapper<TEnum>.GetNames())}.");
23
+
// Then check the enum
24
+
if(Enum.TryParse(value,outresult))
25
+
returnresult;
26
+
27
+
thrownewArgumentException($"Value '{value}' is not a valid enum name of '{typeof(TEnum)}'. Valid values are: {string.Join(", ",EnumNameMapper<TEnum>.GetNames())}.");
29
28
}
30
29
31
30
/// <summary>
32
31
/// Gets the EnumMemberAttribute's value from the enum's value.
33
32
/// </summary>
34
33
/// <typeparam name="TEnum">The type of enum.</typeparam>
0 commit comments