示例#1
0
 public static AuthenticationBuilder AddApiKeySupport(this AuthenticationBuilder authenticationBuilder, Action <ApiKeyAuthenticationOptions> options)
 {
     return(authenticationBuilder.AddScheme <ApiKeyAuthenticationOptions, ApiKeyAuthenticationHandler>(ApiKeyAuthenticationOptions.DefaultScheme, options));
 }
示例#2
0
 public static AuthenticationBuilder AddWeChat(this AuthenticationBuilder builder)
 => builder.AddWeChat(WeChatDefaults.AuthenticationScheme, _ => { });
 public static AuthenticationBuilder AddTestJwtBearerAuthentication(this AuthenticationBuilder builder, Action <TestJwtBearerAuthenticationOptions> configureOptions)
 {
     return(builder
            .AddScheme <TestJwtBearerAuthenticationOptions, TestJwtBearerAuthenticationHandler>(JwtTestBearerDefaults.AuthenticationScheme, "Test Server Authentication", configureOptions));
 }
示例#4
0
 public static AuthenticationBuilder AddAzureAd(this AuthenticationBuilder builder)
 {
     return(builder.AddAzureAd(_ => { }));
 }
示例#5
0
 public static AuthenticationBuilder AddWeChat(this AuthenticationBuilder builder, string authenticationScheme, Action <WeChatOptions> configureOptions)
 => builder.AddWeChat(authenticationScheme, WeChatDefaults.DisplayName, configureOptions);
 protected internal override void RegisterAuthentication(AuthenticationBuilder builder)
 {
     builder.AddGitter(options => ConfigureDefaults(builder, options));
 }
示例#7
0
 /// <summary>
 /// </summary>
 public static AuthenticationBuilder AddQQAuthentication(this AuthenticationBuilder builder, string authenticationScheme, Action <QQAuthenticationOptions> configureOptions)
 {
     return(builder.AddQQAuthentication(authenticationScheme, QQAuthenticationDefaults.DisplayName, configureOptions));
 }
 public static AuthenticationBuilder AddBitpayAuthentication(this AuthenticationBuilder builder)
 {
     builder.AddScheme <BitpayAuthenticationOptions, BitpayAuthenticationHandler>(AuthenticationSchemes.Bitpay, o => { });
     return(builder);
 }
示例#9
0
 /// <summary>
 /// Adds <see cref="CiscoSparkAuthenticationHandler"/> to the specified
 /// <see cref="AuthenticationBuilder"/>, which enables CiscoSpark authentication capabilities.
 /// </summary>
 /// <param name="builder">The authentication builder.</param>
 /// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
 public static AuthenticationBuilder AddCiscoSpark([NotNull] this AuthenticationBuilder builder)
 {
     return(builder.AddCiscoSpark(CiscoSparkAuthenticationDefaults.AuthenticationScheme, options => { }));
 }
 public static AuthenticationBuilder AddODPAuthentication(this AuthenticationBuilder builder, string authenticationScheme, Action <ODPAuthenticationOptions> configureOptions)
 {
     builder.Services.AddSingleton <IPostConfigureOptions <ODPAuthenticationOptions>, ODPAuthenticationPostConfigureOptions>();
     return(builder.AddScheme <ODPAuthenticationOptions, ODPAuthenticationHandler>(authenticationScheme, configureOptions));
 }
示例#11
0
 public static AuthenticationBuilder AddFakeAuth(this AuthenticationBuilder builder)
 {
     builder.AddScheme <FakeAuthOptions, FakeAuthHandler>("Fake", options => { });
     return(builder);
 }
 public static AuthenticationBuilder AddODPAuthentication(this AuthenticationBuilder builder, Action <ODPAuthenticationOptions> configureOptions)
 {
     return(AddODPAuthentication(builder, ODPAuthenticationDefaults.AuthenticationScheme, configureOptions));
 }
 public static AuthenticationBuilder AddODPAuthentication(this AuthenticationBuilder builder, string authenticationScheme)
 {
     return(AddODPAuthentication(builder, authenticationScheme, _ => { }));
 }
 public static AuthenticationBuilder AddODPAuthentication(this AuthenticationBuilder builder)
 {
     return(AddODPAuthentication(builder, ODPAuthenticationDefaults.AuthenticationScheme, _ => { }));
 }
 /// <summary>
 /// 添加QQ身份认证
 /// </summary>
 /// <param name="builder">身份认证构建器</param>
 /// <param name="authenticationScheme">QQ身份认证标识</param>
 /// <param name="configureOptions">QQ身份认证选项</param>
 /// <returns>身份认证构建器</returns>
 public static AuthenticationBuilder AddQQ(this AuthenticationBuilder builder, string authenticationScheme, Action <QQOptions> configureOptions)
 => builder.AddQQ(authenticationScheme, QQDefaults.DisplayName, configureOptions);
示例#16
0
 /// <summary>
 /// Adds <see cref="CiscoSparkAuthenticationHandler"/> to the specified
 /// <see cref="AuthenticationBuilder"/>, which enables CiscoSpark authentication capabilities.
 /// </summary>
 /// <param name="builder">The authentication builder.</param>
 /// <param name="configuration">The delegate used to configure the OpenID 2.0 options.</param>
 /// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
 public static AuthenticationBuilder AddCiscoSpark(
     [NotNull] this AuthenticationBuilder builder,
     [NotNull] Action <CiscoSparkAuthenticationOptions> configuration)
 {
     return(builder.AddCiscoSpark(CiscoSparkAuthenticationDefaults.AuthenticationScheme, configuration));
 }
 /// <summary>
 /// 添加QQ身份认证
 /// </summary>
 /// <param name="builder">身份认证构建器</param>
 /// <param name="authenticationScheme">QQ身份认证标识</param>
 /// <param name="displayName">QQ身份认证显示名称</param>
 /// <param name="configureOptions">QQ身份认证选项</param>
 /// <returns>身份认证构建器</returns>
 public static AuthenticationBuilder AddQQ(this AuthenticationBuilder builder,
                                           string authenticationScheme,
                                           string displayName,
                                           Action <QQOptions> configureOptions)
 => builder.AddOAuth <QQOptions, QQHandler>(authenticationScheme, displayName, configureOptions);
示例#18
0
 public static AuthenticationBuilder AddP7Twitter(this AuthenticationBuilder builder)
 => builder.AddP7Twitter(TwitterDefaults.AuthenticationScheme, _ => { });
示例#19
0
 /// <summary>
 /// </summary>
 public static AuthenticationBuilder AddQQAuthentication(this AuthenticationBuilder builder)
 {
     return(builder.AddQQAuthentication(QQAuthenticationDefaults.AuthenticationScheme, QQAuthenticationDefaults.DisplayName, options => { }));
 }
示例#20
0
 public static AuthenticationBuilder AddP7Twitter(this AuthenticationBuilder builder, Action <TwitterOptions> configureOptions)
 => builder.AddP7Twitter(TwitterDefaults.AuthenticationScheme, configureOptions);
示例#21
0
 /// <summary>
 /// </summary>
 public static AuthenticationBuilder AddQQAuthentication(this AuthenticationBuilder builder, string authenticationScheme, string displayName, Action <QQAuthenticationOptions> configureOptions)
 {
     return(builder.AddOAuth <QQAuthenticationOptions, QQAuthenticationHandler>(authenticationScheme, displayName, configureOptions));
 }
示例#22
0
 public static AuthenticationBuilder AddP7Twitter(this AuthenticationBuilder builder, string authenticationScheme, Action <TwitterOptions> configureOptions)
 => builder.AddP7Twitter(authenticationScheme, TwitterDefaults.DisplayName, configureOptions);
示例#23
0
 public static AuthenticationBuilder AddWeChat(this AuthenticationBuilder builder, Action <WeChatOptions> configureOptions)
 => builder.AddWeChat(WeChatDefaults.AuthenticationScheme, configureOptions);
示例#24
0
 public static AuthenticationBuilder AddP7Twitter(this AuthenticationBuilder builder, string authenticationScheme, string displayName, Action <TwitterOptions> configureOptions)
 {
     builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton <IPostConfigureOptions <TwitterOptions>, TwitterPostConfigureOptions>());
     return(builder.AddRemoteScheme <TwitterOptions, TwitterHandler>(authenticationScheme, displayName, configureOptions));
 }
示例#25
0
 public static AuthenticationBuilder AddWeChat(this AuthenticationBuilder builder, string authenticationScheme, string displayName, Action <WeChatOptions> configureOptions)
 => builder.AddOAuth <WeChatOptions, WeChatHandler>(authenticationScheme, displayName, configureOptions);
 /// <summary>
 /// 添加QQ身份认证
 /// </summary>
 /// <param name="builder">身份认证构建器</param>
 /// <returns>身份认证构建器</returns>
 public static AuthenticationBuilder AddQQ(this AuthenticationBuilder builder)
 => builder.AddQQ(QQDefaults.AuthenticationScheme,
                  _ =>
                  { });
示例#27
0
 public static AuthenticationBuilder AddTestAuthentication(this AuthenticationBuilder builder,
                                                           Action <TestAuthenticationOptions> configureOptions)
 {
     return(builder.AddScheme <TestAuthenticationOptions, TestAuthenticationHandler>("Local Scheme", "Local Auth",
                                                                                     configureOptions));
 }
 /// <summary>
 /// 添加QQ身份认证
 /// </summary>
 /// <param name="builder">身份认证构建器</param>
 /// <param name="configureOptions">QQ身份认证选项</param>
 /// <returns>身份认证构建器</returns>
 public static AuthenticationBuilder AddQQ(this AuthenticationBuilder builder, Action <QQOptions> configureOptions)
 => builder.AddQQ(QQDefaults.AuthenticationScheme, configureOptions);
 public static AuthenticationBuilder AddTestJwtBearerAuthentication(this AuthenticationBuilder builder)
 {
     return(builder
            .AddScheme <TestJwtBearerAuthenticationOptions, TestJwtBearerAuthenticationHandler>(JwtTestBearerDefaults.AuthenticationScheme, "Test Server Authentication",
                                                                                                (o) => { }));
 }
示例#30
0
 public static AuthenticationBuilder AddCustomOpenIdConnect(this AuthenticationBuilder builder, string authenticationScheme, string displayName, Action <OpenIdConnectOptions> configureOptions)
 {
     builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton <IPostConfigureOptions <OpenIdConnectOptions>, OpenIdConnectPostConfigureOptions>());
     return(builder.AddRemoteScheme <OpenIdConnectOptions, CustomOpenIdConnectHandler>(authenticationScheme, displayName, configureOptions));
 }