public PartnerPortalImporter(IZohoCRMDataRepository zohoRepository, IEmailSender emailSender, string zohoToken) : base(zohoRepository, emailSender) { TableName = "zcrm_PartnerPortal"; PortalAction = "Add User and Company to ACL"; _tempPassword = "******"; _zohoToken = zohoToken; var pwdValidators = new List <PasswordValidator <ApplicationUser> >(); var pwdValidator = new PasswordValidator <ApplicationUser>(); pwdValidators.Add(pwdValidator); var userValidators = new List <IUserValidator <ApplicationUser> >(); var validator = new UserValidator <ApplicationUser>(); userValidators.Add(validator); var log = new LoggerFactory(); _userManager = new SMSUserManager <ApplicationUser>( new SMSUserStore <ApplicationUser>(new ACLDbContext(new DbContextOptions <ACLDbContext> { })), null, new PasswordHasher <ApplicationUser>(), userValidators, pwdValidators, new UpperInvariantLookupNormalizer(), new IdentityErrorDescriber(), null, new Logger <UserManager <ApplicationUser> >(log)); }
public BitdefenderImporter(IZohoCRMDataRepository zohoRepository, IEmailSender emailSender) : base(zohoRepository, emailSender) { TableName = "zcrm_Bitdefender"; PortalAction = "Assign Bitdefender to Company"; _bdClarimType = "CustomerPortal.Module"; _bdClarimValue = "BitDefender"; var pwdValidators = new List <PasswordValidator <ApplicationUser> >(); var pwdValidator = new PasswordValidator <ApplicationUser>(); pwdValidators.Add(pwdValidator); var userValidators = new List <IUserValidator <ApplicationUser> >(); var validator = new UserValidator <ApplicationUser>(); userValidators.Add(validator); var log = new LoggerFactory(); _userManager = new SMSUserManager <ApplicationUser>( new SMSUserStore <ApplicationUser>(new ACLDbContext(new DbContextOptions <ACLDbContext> { })), null, new PasswordHasher <ApplicationUser>(), userValidators, pwdValidators, new UpperInvariantLookupNormalizer(), new IdentityErrorDescriber(), null, new Logger <UserManager <ApplicationUser> >(log)); }
public async Task <ClaimsIdentity> GenerateUserIdentityAsync(SMSUserManager manager) { // 请注意,authenticationType 必须与 CookieAuthenticationOptions.AuthenticationType 中定义的相应项匹配 var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie); // 在此处添加自定义用户声明 return(userIdentity); }
protected override void Dispose(bool disposing) { if (disposing && _userManager != null) { _userManager.Dispose(); _userManager = null; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (_userManager != null) { _userManager.Dispose(); _userManager = null; } if (_signInManager != null) { _signInManager.Dispose(); _signInManager = null; } } base.Dispose(disposing); }
public RoleController(SMSUserManager userManager, SMSSignInManager signInManager, SMSRoleManager roleManager) { UserManager = userManager; SignInManager = signInManager; RoleManager = roleManager; }
public ManageController(SMSUserManager userManager, SMSSignInManager signInManager) { UserManager = userManager; SignInManager = signInManager; }