示例#1
0
        /// <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)));
        }
示例#2
0
 public AccountController(
     SignInManager <IdentityUser> signInManager,
     UserManager <IdentityUser> userManager,
     EmailService emailService,
     ExternalIdentityProviders externalIdentityProviders,
     UiLinks uiLinks)
 {
     _signInManager             = signInManager;
     _userManager               = userManager;
     _emailService              = emailService;
     _externalIdentityProviders = externalIdentityProviders;
     _uiLinks = uiLinks;
 }
示例#3
0
 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;
 }
示例#4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="externalIdentityProvider"></param>
 /// <returns></returns>
 public bool CanProcess(ExternalIdentityProviders externalIdentityProvider)
 {
     return(ExternalIdentityProviders.Facebook == externalIdentityProvider);
 }
示例#5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="externalIdentityProvider"></param>
 /// <returns></returns>
 public bool CanProcess(ExternalIdentityProviders externalIdentityProvider)
 {
     return(ExternalIdentityProviders.Google == externalIdentityProvider);
 }