|
4 | 4 | namespace AspNetCore.SecurityKey; |
5 | 5 |
|
6 | 6 | /// <summary> |
7 | | -/// Extension methods to configure security API key authentication. |
| 7 | +/// Provides extension methods for configuring security API key authentication in ASP.NET Core applications. |
8 | 8 | /// </summary> |
9 | 9 | public static class AuthenticationBuilderExtensions |
10 | 10 | { |
11 | 11 | /// <summary> |
12 | | - /// Adds security API key authentication to <see cref="AuthenticationBuilder"/> using the default scheme. |
13 | | - /// The default scheme is specified by <see cref="SecurityKeyAuthenticationDefaults.AuthenticationScheme"/>. |
| 12 | + /// Registers security API key authentication using the default scheme. |
| 13 | + /// The default scheme is defined by <see cref="SecurityKeyAuthenticationDefaults.AuthenticationScheme"/>. |
14 | 14 | /// </summary> |
15 | | - /// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param> |
16 | | - /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> |
| 15 | + /// <param name="builder">The <see cref="AuthenticationBuilder"/> to configure.</param> |
| 16 | + /// <returns> |
| 17 | + /// The <see cref="AuthenticationBuilder"/> instance for chaining further authentication configuration. |
| 18 | + /// </returns> |
17 | 19 | public static AuthenticationBuilder AddSecurityKey(this AuthenticationBuilder builder) |
18 | 20 | => builder.AddSecurityKey(SecurityKeyAuthenticationDefaults.AuthenticationScheme); |
19 | 21 |
|
20 | 22 | /// <summary> |
21 | | - /// Adds security API key authentication to <see cref="AuthenticationBuilder"/> using the specified scheme. |
| 23 | + /// Registers security API key authentication using a specified scheme. |
22 | 24 | /// </summary> |
23 | | - /// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param> |
24 | | - /// <param name="authenticationScheme">The authentication scheme.</param> |
25 | | - /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> |
| 25 | + /// <param name="builder">The <see cref="AuthenticationBuilder"/> to configure.</param> |
| 26 | + /// <param name="authenticationScheme">The name of the authentication scheme to use.</param> |
| 27 | + /// <returns> |
| 28 | + /// The <see cref="AuthenticationBuilder"/> instance for chaining further authentication configuration. |
| 29 | + /// </returns> |
26 | 30 | public static AuthenticationBuilder AddSecurityKey(this AuthenticationBuilder builder, string authenticationScheme) |
27 | 31 | => builder.AddSecurityKey(authenticationScheme, configureOptions: null); |
28 | 32 |
|
29 | 33 | /// <summary> |
30 | | - /// Adds security API key authentication to <see cref="AuthenticationBuilder"/> using the default scheme. |
31 | | - /// The default scheme is specified by <see cref="SecurityKeyAuthenticationDefaults.AuthenticationScheme"/>. |
| 34 | + /// Registers security API key authentication using the default scheme and allows configuration of options. |
| 35 | + /// The default scheme is defined by <see cref="SecurityKeyAuthenticationDefaults.AuthenticationScheme"/>. |
32 | 36 | /// </summary> |
33 | | - /// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param> |
| 37 | + /// <param name="builder">The <see cref="AuthenticationBuilder"/> to configure.</param> |
34 | 38 | /// <param name="configureOptions">A delegate to configure <see cref="SecurityKeyAuthenticationSchemeOptions"/>.</param> |
35 | | - /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> |
| 39 | + /// <returns> |
| 40 | + /// The <see cref="AuthenticationBuilder"/> instance for chaining further authentication configuration. |
| 41 | + /// </returns> |
36 | 42 | public static AuthenticationBuilder AddSecurityKey(this AuthenticationBuilder builder, Action<SecurityKeyAuthenticationSchemeOptions>? configureOptions) |
37 | 43 | => builder.AddSecurityKey(SecurityKeyAuthenticationDefaults.AuthenticationScheme, configureOptions); |
38 | 44 |
|
39 | 45 | /// <summary> |
40 | | - /// Adds security API key authentication to <see cref="AuthenticationBuilder"/> using the specified scheme. |
| 46 | + /// Registers security API key authentication using a specified scheme and allows configuration of options. |
41 | 47 | /// </summary> |
42 | | - /// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param> |
43 | | - /// <param name="authenticationScheme">The authentication scheme.</param> |
| 48 | + /// <param name="builder">The <see cref="AuthenticationBuilder"/> to configure.</param> |
| 49 | + /// <param name="authenticationScheme">The name of the authentication scheme to use.</param> |
44 | 50 | /// <param name="configureOptions">A delegate to configure <see cref="SecurityKeyAuthenticationSchemeOptions"/>.</param> |
45 | | - /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> |
| 51 | + /// <returns> |
| 52 | + /// The <see cref="AuthenticationBuilder"/> instance for chaining further authentication configuration. |
| 53 | + /// </returns> |
46 | 54 | public static AuthenticationBuilder AddSecurityKey(this AuthenticationBuilder builder, string authenticationScheme, Action<SecurityKeyAuthenticationSchemeOptions>? configureOptions) |
47 | 55 | => builder.AddSecurityKey(authenticationScheme, displayName: null, configureOptions: configureOptions); |
48 | 56 |
|
49 | 57 | /// <summary> |
50 | | - /// Adds security API key authentication to <see cref="AuthenticationBuilder"/> using the specified scheme. |
| 58 | + /// Registers security API key authentication using a specified scheme, display name, and configuration options. |
51 | 59 | /// </summary> |
52 | | - /// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param> |
53 | | - /// <param name="authenticationScheme">The authentication scheme.</param> |
54 | | - /// <param name="displayName">A display name for the authentication handler.</param> |
| 60 | + /// <param name="builder">The <see cref="AuthenticationBuilder"/> to configure.</param> |
| 61 | + /// <param name="authenticationScheme">The name of the authentication scheme to use.</param> |
| 62 | + /// <param name="displayName">A display name for the authentication handler, used for UI or logging purposes.</param> |
55 | 63 | /// <param name="configureOptions">A delegate to configure <see cref="SecurityKeyAuthenticationSchemeOptions"/>.</param> |
56 | | - /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> |
| 64 | + /// <returns> |
| 65 | + /// The <see cref="AuthenticationBuilder"/> instance for chaining further authentication configuration. |
| 66 | + /// </returns> |
| 67 | + /// <exception cref="ArgumentNullException"> |
| 68 | + /// Thrown when <paramref name="builder"/> is <c>null</c>. |
| 69 | + /// </exception> |
57 | 70 | public static AuthenticationBuilder AddSecurityKey(this AuthenticationBuilder builder, string authenticationScheme, string? displayName, Action<SecurityKeyAuthenticationSchemeOptions>? configureOptions) |
58 | 71 | { |
59 | 72 | ArgumentNullException.ThrowIfNull(builder); |
|
0 commit comments