Esempio n. 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="userManager"></param>
 /// <param name="signInManager"></param>
 /// <param name="roleManager"></param>
 /// <param name="dbContext"></param>
 /// <param name="tokenGenerator"></param>
 /// <param name="emailSender"></param>
 /// <param name="clientFactory"></param>
 /// <param name="facebookOptions"></param>
 public AccountController(
     UserManager <User> userManager,
     SignInManager <User> signInManager,
     RoleManager <IdentityRole> roleManager,
     Db dbContext,
     ITokenGenerator tokenGenerator,
     IEmailSender emailSender,
     IHttpClientFactory clientFactory,
     IFacebookAuthOptions facebookOptions
     )
 {
     this._userManager     = userManager;
     this._signInManager   = signInManager;
     this.Context          = dbContext;
     this._tokenGenerator  = tokenGenerator;
     this._emailSender     = emailSender;
     this._clientFactory   = clientFactory;
     this._facebookOptions = facebookOptions;
     this._roleManager     = roleManager;
 }
 public static Task <IFacebookAccount> AuthenticateFacebookAsync(this SocialAuthManager manager, IFacebookAuthOptions options, string accountId = null)
 {
     return(manager.AuthenticateAsync <IFacebookAccount, IFacebookAuthOptions>(ProviderType.Facebook, options, accountId));
 }