Пример #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);
 }