|
9 | 9 |
|
10 | 10 | namespace Microsoft.Extensions.DependencyInjection
|
11 | 11 | {
|
| 12 | + /// <summary> |
| 13 | + /// Extension methods to configure Twitter OAuth authentication. |
| 14 | + /// </summary> |
12 | 15 | public static class TwitterExtensions
|
13 | 16 | {
|
| 17 | + /// <summary> |
| 18 | + /// Adds Twitter OAuth-based authentication to <see cref="AuthenticationBuilder"/> using the default scheme. |
| 19 | + /// The default scheme is specified by <see cref="TwitterDefaults.AuthenticationScheme"/>. |
| 20 | + /// <para> |
| 21 | + /// Facebook authentication allows application users to sign in with their Facebook account. |
| 22 | + /// </para> |
| 23 | + /// </summary> |
| 24 | + /// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param> |
| 25 | + /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> |
14 | 26 | public static AuthenticationBuilder AddTwitter(this AuthenticationBuilder builder)
|
15 | 27 | => builder.AddTwitter(TwitterDefaults.AuthenticationScheme, _ => { });
|
16 | 28 |
|
| 29 | + /// <summary> |
| 30 | + /// Adds Twitter OAuth-based authentication to <see cref="AuthenticationBuilder"/> using the default scheme. |
| 31 | + /// The default scheme is specified by <see cref="TwitterDefaults.AuthenticationScheme"/>. |
| 32 | + /// <para> |
| 33 | + /// Facebook authentication allows application users to sign in with their Facebook account. |
| 34 | + /// </para> |
| 35 | + /// </summary> |
| 36 | + /// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param> |
| 37 | + /// <param name="configureOptions">A delegate to configure <see cref="TwitterOptions"/>.</param> |
| 38 | + /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> |
17 | 39 | public static AuthenticationBuilder AddTwitter(this AuthenticationBuilder builder, Action<TwitterOptions> configureOptions)
|
18 | 40 | => builder.AddTwitter(TwitterDefaults.AuthenticationScheme, configureOptions);
|
19 | 41 |
|
| 42 | + /// <summary> |
| 43 | + /// Adds Twitter OAuth-based authentication to <see cref="AuthenticationBuilder"/> using the default scheme. |
| 44 | + /// The default scheme is specified by <see cref="TwitterDefaults.AuthenticationScheme"/>. |
| 45 | + /// <para> |
| 46 | + /// Facebook authentication allows application users to sign in with their Facebook account. |
| 47 | + /// </para> |
| 48 | + /// </summary> |
| 49 | + /// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param> |
| 50 | + /// <param name="authenticationScheme">The authentication scheme.</param> |
| 51 | + /// <param name="configureOptions">A delegate to configure <see cref="TwitterOptions"/>.</param> |
| 52 | + /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> |
20 | 53 | public static AuthenticationBuilder AddTwitter(this AuthenticationBuilder builder, string authenticationScheme, Action<TwitterOptions> configureOptions)
|
21 | 54 | => builder.AddTwitter(authenticationScheme, TwitterDefaults.DisplayName, configureOptions);
|
22 | 55 |
|
| 56 | + /// <summary> |
| 57 | + /// Adds Twitter OAuth-based authentication to <see cref="AuthenticationBuilder"/> using the default scheme. |
| 58 | + /// The default scheme is specified by <see cref="TwitterDefaults.AuthenticationScheme"/>. |
| 59 | + /// <para> |
| 60 | + /// Facebook authentication allows application users to sign in with their Facebook account. |
| 61 | + /// </para> |
| 62 | + /// </summary> |
| 63 | + /// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param> |
| 64 | + /// <param name="authenticationScheme">The authentication scheme.</param> |
| 65 | + /// <param name="displayName">A display name for the authentication handler.</param> |
| 66 | + /// <param name="configureOptions">A delegate to configure <see cref="TwitterOptions"/>.</param> |
| 67 | + /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> |
23 | 68 | public static AuthenticationBuilder AddTwitter(this AuthenticationBuilder builder, string authenticationScheme, string displayName, Action<TwitterOptions> configureOptions)
|
24 | 69 | {
|
25 | 70 | builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IPostConfigureOptions<TwitterOptions>, TwitterPostConfigureOptions>());
|
|
0 commit comments