Skip to content

Commit 274e7a8

Browse files
authored
Generate XML documentation file (#502)
1 parent b597d18 commit 274e7a8

11 files changed

+51
-29
lines changed

Directory.Build.props

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
<SupportedTargetFrameworks>net6.0</SupportedTargetFrameworks>
1919
<ImplicitUsings>enable</ImplicitUsings>
2020
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
21+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
22+
<!--
23+
Temporary disabling of CS1591 (Missing XML comment for publicly visible type or member) warning
24+
Make sure to re-enable it when https://github.com/passwordless-lib/fido2-net-lib/issues/501 is resolved.
25+
-->
26+
<NoWarn>$(NoWarn);CS1591</NoWarn>
2127
</PropertyGroup>
2228

2329
<!-- Language + Compiler Settings-->

Src/Fido2.AspNet/Fido2NetLibBuilderExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public interface IFido2MetadataServiceBuilder
9999
public class Fido2NetLibBuilder : IFido2NetLibBuilder, IFido2MetadataServiceBuilder
100100
{
101101
/// <summary>
102-
/// Initializes a new instance of the <see cref="IdentityServerBuilder"/> class.
102+
/// Initializes a new instance of the <see cref="Fido2NetLibBuilder"/> class.
103103
/// </summary>
104104
/// <param name="services">The services.</param>
105105
/// <exception cref="System.ArgumentNullException">services</exception>

Src/Fido2/AuthenticatorAssertionResponse.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ public static AuthenticatorAssertionResponse Parse(AuthenticatorAssertionRawResp
4646
/// Implements algorithm from https://www.w3.org/TR/webauthn/#verifying-assertion.
4747
/// </summary>
4848
/// <param name="options">The original assertion options that was sent to the client.</param>
49+
/// <param name="config"></param>
4950
/// <param name="storedPublicKey">The stored public key for this CredentialId.</param>
51+
/// <param name="storedDevicePublicKeys">The stored device public key for this CredentialId.</param>
5052
/// <param name="storedSignatureCounter">The stored counter value for this CredentialId</param>
5153
/// <param name="isUserHandleOwnerOfCredId">A function that returns <see langword="true"/> if user handle is owned by the credential ID.</param>
54+
/// <param name="metadataService"></param>
5255
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
5356
public async Task<VerifyAssertionResult> VerifyAsync(
5457
AssertionOptions options,
@@ -186,7 +189,8 @@ public async Task<VerifyAssertionResult> VerifyAsync(
186189
/// verification steps are performed in the context of this step of § 7.2 Verifying an Authentication Assertion using
187190
/// these variables established therein: credential, clientExtensionResults, authData, and hash. Relying Party policy
188191
/// may specify whether a response without a devicePubKey is acceptable.
189-
/// <see cref="https://w3c.github.io/webauthn/#sctn-device-publickey-extension-verification-get"/>
192+
/// <see href="https://w3c.github.io/webauthn/#sctn-device-publickey-extension-verification-get"/>
193+
/// <param name="storedDevicePublicKeys"></param>
190194
/// <param name="clientExtensionResults"></param>
191195
/// <param name="authData"></param>
192196
/// <param name="hash"></param>

Src/Fido2/AuthenticatorAttestationResponse.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,13 @@ public async Task<RegisteredPublicKeyCredential> VerifyAsync(
209209
/// credential, clientExtensionResults, authData, and hash.
210210
/// Relying Party policy may specify whether a response without a devicePubKey is acceptable.
211211
/// </summary>
212+
/// <param name="config"></param>
213+
/// <param name="metadataService"></param>
212214
/// <param name="clientExtensionResults"></param>
213215
/// <param name="authData"></param>
214216
/// <param name="hash"></param>
215-
/// <see cref="https://w3c.github.io/webauthn/#sctn-device-publickey-extension-verification-create"/>
217+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
218+
/// <see href="https://w3c.github.io/webauthn/#sctn-device-publickey-extension-verification-create"/>
216219
private async Task<byte[]> DevicePublicKeyRegistrationAsync(
217220
Fido2Configuration config,
218221
IMetadataService? metadataService,

Src/Fido2/Fido2.cs

+12-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Fido2NetLib;
99

1010
/// <summary>
11-
/// Public API for parsing and verifying FIDO2 attestation & assertion responses.
11+
/// Public API for parsing and verifying FIDO2 attestation and assertion responses.
1212
/// </summary>
1313
public class Fido2 : IFido2
1414
{
@@ -26,8 +26,10 @@ public Fido2(
2626
/// <summary>
2727
/// Returns CredentialCreateOptions including a challenge to be sent to the browser/authenticator to create new credentials.
2828
/// </summary>
29-
/// <returns></returns>
29+
/// <param name="user"></param>
3030
/// <param name="excludeCredentials">Recommended. This member is intended for use by Relying Parties that wish to limit the creation of multiple credentials for the same account on a single authenticator. The client is requested to return an error if the new credential would be created on an authenticator that also contains one of the credentials enumerated in this parameter.</param>
31+
/// <param name="extensions"></param>
32+
/// <returns></returns>
3133
public CredentialCreateOptions RequestNewCredential(
3234
Fido2User user,
3335
IReadOnlyList<PublicKeyCredentialDescriptor> excludeCredentials,
@@ -39,9 +41,12 @@ public CredentialCreateOptions RequestNewCredential(
3941
/// <summary>
4042
/// Returns CredentialCreateOptions including a challenge to be sent to the browser/authenticator to create new credentials.
4143
/// </summary>
42-
/// <returns></returns>
43-
/// <param name="attestationPreference">This member is intended for use by Relying Parties that wish to express their preference for attestation conveyance. The default is none.</param>
44+
/// <param name="user"></param>
4445
/// <param name="excludeCredentials">Recommended. This member is intended for use by Relying Parties that wish to limit the creation of multiple credentials for the same account on a single authenticator. The client is requested to return an error if the new credential would be created on an authenticator that also contains one of the credentials enumerated in this parameter.</param>
46+
/// <param name="authenticatorSelection"></param>
47+
/// <param name="attestationPreference">This member is intended for use by Relying Parties that wish to express their preference for attestation conveyance. The default is none.</param>
48+
/// <param name="extensions"></param>
49+
/// <returns></returns>
4550
public CredentialCreateOptions RequestNewCredential(
4651
Fido2User user,
4752
IReadOnlyList<PublicKeyCredentialDescriptor> excludeCredentials,
@@ -82,6 +87,9 @@ public async Task<MakeNewCredentialResult> MakeNewCredentialAsync(
8287
/// <summary>
8388
/// Returns AssertionOptions including a challenge to the browser/authenticator to assert existing credentials and authenticate a user.
8489
/// </summary>
90+
/// <param name="allowedCredentials"></param>
91+
/// <param name="userVerification"></param>
92+
/// <param name="extensions"></param>
8593
/// <returns></returns>
8694
public AssertionOptions GetAssertionOptions(
8795
IReadOnlyList<PublicKeyCredentialDescriptor> allowedCredentials,

Src/Fido2/IMetadataService.cs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public interface IMetadataService
1010
/// Gets the metadata payload entry by a guid asynchronously.
1111
/// </summary>
1212
/// <param name="aaguid">The Authenticator Attestation GUID.</param>
13+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
1314
/// <returns>Returns the entry; Otherwise <c>null</c>.</returns>
1415
Task<MetadataBLOBPayloadEntry?> GetEntryAsync(Guid aaguid, CancellationToken cancellationToken = default);
1516

Src/Fido2/Objects/AttestedCredentialData.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public sealed class AttestedCredentialData
1010
{
1111
/// <summary>
1212
/// Minimum length of the attested credential data structure. AAGUID + credentialID length + credential ID + credential public key.
13-
/// <see cref="https://www.w3.org/TR/webauthn/#attested-credential-data"/>
13+
/// <see href="https://www.w3.org/TR/webauthn/#attested-credential-data"/>
1414
/// </summary>
1515
private const int _minLength = 20; // Marshal.SizeOf(typeof(Guid)) + sizeof(ushort) + sizeof(byte) + sizeof(byte)
1616

@@ -34,20 +34,20 @@ public AttestedCredentialData(Guid aaGuid, byte[] credentialId, CredentialPublic
3434

3535
/// <summary>
3636
/// The AAGUID of the authenticator. Can be used to identify the make and model of the authenticator.
37-
/// <see cref="https://www.w3.org/TR/webauthn/#aaguid"/>
37+
/// <see href="https://www.w3.org/TR/webauthn/#aaguid"/>
3838
/// </summary>
3939
public Guid AaGuid { get; }
4040

4141
/// <summary>
4242
/// A probabilistically-unique byte sequence identifying a public key credential source and its authentication assertions.
43-
/// <see cref="https://www.w3.org/TR/webauthn/#credential-id"/>
43+
/// <see href="https://www.w3.org/TR/webauthn/#credential-id"/>
4444
/// </summary>
4545
public byte[] CredentialId { get; }
4646

4747
/// <summary>
4848
/// The credential public key encoded in COSE_Key format, as defined in
4949
/// Section 7 of RFC8152, using the CTAP2 canonical CBOR encoding form.
50-
/// <see cref="https://www.w3.org/TR/webauthn/#credential-public-key"/>
50+
/// <see href="https://www.w3.org/TR/webauthn/#credential-public-key"/>
5151
/// </summary>
5252
public CredentialPublicKey CredentialPublicKey { get; }
5353

Src/Fido2/Objects/AuthenticatorData.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public sealed class AuthenticatorData
1111
{
1212
/// <summary>
1313
/// Minimum length of the authenticator data structure.
14-
/// <see cref="https://www.w3.org/TR/webauthn/#sec-authenticator-data"/>
14+
/// <see href="https://www.w3.org/TR/webauthn/#sec-authenticator-data"/>
1515
/// </summary>
1616
internal const int MinLength = SHA256HashLenBytes + sizeof(AuthenticatorFlags) + sizeof(uint);
1717

@@ -55,13 +55,13 @@ public AuthenticatorData(byte[] rpIdHash, AuthenticatorFlags flags, uint signCou
5555

5656
/// <summary>
5757
/// UserPresent indicates that the user presence test has completed successfully.
58-
/// <see cref="https://www.w3.org/TR/webauthn/#up"/>
58+
/// <see href="https://www.w3.org/TR/webauthn/#up"/>
5959
/// </summary>
6060
public bool UserPresent => _flags.HasFlag(AuthenticatorFlags.UP);
6161

6262
/// <summary>
6363
/// UserVerified indicates that the user verification process has completed successfully.
64-
/// <see cref="https://www.w3.org/TR/webauthn/#uv"/>
64+
/// <see href="https://www.w3.org/TR/webauthn/#uv"/>
6565
/// </summary>
6666
public bool UserVerified => _flags.HasFlag(AuthenticatorFlags.UV);
6767

@@ -70,27 +70,27 @@ public AuthenticatorData(byte[] rpIdHash, AuthenticatorFlags flags, uint signCou
7070
/// Backup eligibility is signaled in authenticator data's flags along with the current backup state.
7171
/// Backup eligibility is a credential property and is permanent for a given public key credential source.
7272
/// A backup eligible public key credential source is referred to as a multi-device credential whereas one that is not backup eligible is referred to as a single-device credential.
73-
/// <see cref="https://w3c.github.io/webauthn/#backup-eligibility"/>
73+
/// <see href="https://w3c.github.io/webauthn/#backup-eligibility"/>
7474
/// </summary>
7575
public bool IsBackupEligible => _flags.HasFlag(AuthenticatorFlags.BE);
7676

7777
/// <summary>
7878
/// The current backup state of a multi-device credential as determined by the current managing authenticator.
7979
/// Backup state is signaled in authenticator data's flags and can change over time.
80-
/// <see cref="https://w3c.github.io/webauthn/#backup-state"/>
80+
/// <see href="https://w3c.github.io/webauthn/#backup-state"/>
8181
/// </summary>
8282
public bool IsBackedUp => _flags.HasFlag(AuthenticatorFlags.BS);
8383

8484
/// <summary>
8585
/// HasAttestedCredentialData indicates that the authenticator added attested credential data to the authenticator data.
86-
/// <see cref="https://www.w3.org/TR/webauthn/#attested-credential-data"/>
86+
/// <see href="https://www.w3.org/TR/webauthn/#attested-credential-data"/>
8787
/// </summary>
8888
[MemberNotNullWhen(true, nameof(AttestedCredentialData))]
8989
public bool HasAttestedCredentialData => _flags.HasFlag(AuthenticatorFlags.AT);
9090

9191
/// <summary>
9292
/// HasExtensionsData indicates that the authenticator added extension data to the authenticator data.
93-
/// <see cref="https://www.w3.org/TR/webauthn/#authdataextensions"/>
93+
/// <see href="https://www.w3.org/TR/webauthn/#authdataextensions"/>
9494
/// </summary>
9595
[MemberNotNullWhen(true, nameof(Extensions))]
9696
public bool HasExtensionsData => _flags.HasFlag(AuthenticatorFlags.ED);

Src/Fido2/Objects/AuthenticatorFlags.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ namespace Fido2NetLib.Objects;
44

55
/// <summary>
66
/// Authenticator data flags
7-
/// <see cref="https://www.w3.org/TR/webauthn/#flags"/>
7+
/// <see href="https://www.w3.org/TR/webauthn/#flags"/>
88
/// </summary>
99
[Flags]
1010
public enum AuthenticatorFlags : byte
1111
{
1212
/// <summary>
1313
/// User Present indicates that the user presence test has completed successfully.
14-
/// <see cref="https://www.w3.org/TR/webauthn/#up"/>
14+
/// <see href="https://www.w3.org/TR/webauthn/#up"/>
1515
/// </summary>
1616
UP = 0x1,
1717

@@ -22,7 +22,7 @@ public enum AuthenticatorFlags : byte
2222

2323
/// <summary>
2424
/// User Verified indicates that the user verification process has completed successfully.
25-
/// <see cref="https://www.w3.org/TR/webauthn/#uv"/>
25+
/// <see href="https://www.w3.org/TR/webauthn/#uv"/>
2626
/// </summary>
2727
UV = 0x4,
2828

@@ -31,14 +31,14 @@ public enum AuthenticatorFlags : byte
3131
/// Backup eligibility is signaled in authenticator data's flags along with the current backup state.
3232
/// Backup eligibility is a credential property and is permanent for a given public key credential source.
3333
/// A backup eligible public key credential source is referred to as a multi-device credential whereas one that is not backup eligible is referred to as a single-device credential.
34-
/// <see cref="https://w3c.github.io/webauthn/#backup-eligibility"/>
34+
/// <see href="https://w3c.github.io/webauthn/#backup-eligibility"/>
3535
/// </summary>
3636
BE = 0x8,
3737

3838
/// <summary>
3939
/// The current backup state of a multi-device credential as determined by the current managing authenticator.
4040
/// Backup state is signaled in authenticator data's flags and can change over time.
41-
/// <see cref="https://w3c.github.io/webauthn/#backup-state"/>
41+
/// <see href="https://w3c.github.io/webauthn/#backup-state"/>
4242
/// </summary>
4343
BS = 0x10,
4444

@@ -49,13 +49,13 @@ public enum AuthenticatorFlags : byte
4949

5050
/// <summary>
5151
/// Attested credential data included indicates that the authenticator added attested credential data to the authenticator data.
52-
/// <see cref="https://www.w3.org/TR/webauthn/#attested-credential-data"/>
52+
/// <see href="https://www.w3.org/TR/webauthn/#attested-credential-data"/>
5353
/// </summary>
5454
AT = 0x40,
5555

5656
/// <summary>
5757
/// Extension data included indicates that the authenticator added extension data to the authenticator data.
58-
/// <see cref="https://www.w3.org/TR/webauthn/#authdataextensions"/>
58+
/// <see href="https://www.w3.org/TR/webauthn/#authdataextensions"/>
5959
/// </summary>
6060
ED = 0x80,
6161
}

Src/Fido2/Objects/DevicePublicKeyAuthenticatorOutput.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ internal DevicePublicKeyAuthenticatorOutput(CborMap map)
3535

3636
/// <summary>
3737
/// The AAGUID of the authenticator. Can be used to identify the make and model of the authenticator.
38-
/// <see cref="https://www.w3.org/TR/webauthn/#aaguid"/>
38+
/// <see href="https://www.w3.org/TR/webauthn/#aaguid"/>
3939
/// </summary>
4040
public Guid AaGuid { get; }
4141

4242
/// <summary>
4343
/// The credential public key encoded in COSE_Key format, as defined in
4444
/// Section 7 of RFC8152, using the CTAP2 canonical CBOR encoding form.
45-
/// <see cref="https://www.w3.org/TR/webauthn/#credential-public-key"/>
45+
/// <see href="https://www.w3.org/TR/webauthn/#credential-public-key"/>
4646
/// </summary>
4747
public CredentialPublicKey DevicePublicKey { get; }
4848

@@ -65,7 +65,7 @@ internal DevicePublicKeyAuthenticatorOutput(CborMap map)
6565

6666
/// <summary>
6767
/// Attestation statement formats are identified by a string, called an attestation statement format identifier, chosen by the author of the attestation statement format.
68-
/// <see cref="https://w3c.github.io/webauthn/#sctn-attstn-fmt-ids"/>
68+
/// <see href="https://w3c.github.io/webauthn/#sctn-attstn-fmt-ids"/>
6969
/// </summary>
7070
public string Fmt { get; }
7171

Src/Fido2/Objects/Extensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Fido2NetLib.Objects;
44

55
/// <summary>
6-
/// <see cref="https://www.w3.org/TR/webauthn/#extensions"/>
6+
/// <see href="https://www.w3.org/TR/webauthn/#extensions"/>
77
/// </summary>
88
public sealed class Extensions
99
{

0 commit comments

Comments
 (0)