/// <summary> /// /// </summary> /// <param name="externalIdentityProvider"></param> /// <returns></returns> public IExternalIdentityProvider GetExternalIdentityProvider(ExternalIdentityProviders externalIdentityProvider) { if (null == _externalIdentityProviders) { return(null); } return(_externalIdentityProviders.FirstOrDefault(provider => provider.CanProcess(externalIdentityProvider))); }
public AccountController( SignInManager <IdentityUser> signInManager, UserManager <IdentityUser> userManager, EmailService emailService, ExternalIdentityProviders externalIdentityProviders, UiLinks uiLinks) { _signInManager = signInManager; _userManager = userManager; _emailService = emailService; _externalIdentityProviders = externalIdentityProviders; _uiLinks = uiLinks; }
public SignInController( SignInManager <ApplicationUser> signInManager, UserManager <ApplicationUser> userManager, ExternalIdentityProviders externalIdentityProviders, ITokenService tokenService, IStringLocalizer <SignInController> localizer) { _signInManager = signInManager; _userManager = userManager; _externalIdentityProviders = externalIdentityProviders; _tokenService = tokenService; _localizer = localizer; }
/// <summary> /// /// </summary> /// <param name="externalIdentityProvider"></param> /// <returns></returns> public bool CanProcess(ExternalIdentityProviders externalIdentityProvider) { return(ExternalIdentityProviders.Facebook == externalIdentityProvider); }
/// <summary> /// /// </summary> /// <param name="externalIdentityProvider"></param> /// <returns></returns> public bool CanProcess(ExternalIdentityProviders externalIdentityProvider) { return(ExternalIdentityProviders.Google == externalIdentityProvider); }