protected virtual bool IsSocialAuthConfigured(Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme) { if (CustomSocialAuthSchemes.Schemes.Contains(scheme.Name)) { return(true); } switch (scheme.Name) { case "Microsoft": if (!string.IsNullOrWhiteSpace(UserManager.Site.MicrosoftClientId)) { return(true); } break; case "Google": if (!string.IsNullOrWhiteSpace(UserManager.Site.GoogleClientId)) { return(true); } break; case "Facebook": if (!string.IsNullOrWhiteSpace(UserManager.Site.FacebookAppId)) { return(true); } break; case "Twitter": if (!string.IsNullOrWhiteSpace(UserManager.Site.TwitterConsumerKey)) { return(true); } break; case "OpenIdConnect": if (!string.IsNullOrWhiteSpace(UserManager.Site.OidConnectAppId)) { return(true); } break; } return(false); }
public Task InitializeAsync(AuthenticationScheme scheme, HttpContext context) { return(Task.FromResult(0)); }
/// <summary> /// Constructor. /// </summary> /// <param name="context">The context.</param> /// <param name="scheme">The authentication scheme.</param> /// <param name="options">The authentication options associated with the scheme.</param> /// <param name="properties">The authentication properties.</param> protected PrincipalContext(HttpContext context, AuthenticationScheme scheme, TOptions options, AuthenticationProperties?properties) : base(context, scheme, options, properties) { }
/// <summary> /// Initializes a new instance of <see cref="ResultContext{TOptions}"/>. /// </summary> /// <param name="context">The context.</param> /// <param name="scheme">The authentication scheme.</param> /// <param name="options">The authentication options associated with the scheme.</param> protected ResultContext(HttpContext context, AuthenticationScheme scheme, TOptions options) : base(context, scheme, options) { }
public Task InitializeAsync(AuthenticationScheme scheme, HttpContext context) { Scheme = scheme; return(Task.CompletedTask); }