public static UserManager<ApplicationUser> CreateUserManager(IDataProtectionProvider dataProtectionProvider, IPartsUnlimitedContext context) { var manager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>((DbContext)context)); // Configure validation logic for usernames manager.UserValidator = new UserValidator<ApplicationUser>(manager) { AllowOnlyAlphanumericUserNames = false, RequireUniqueEmail = true }; // Configure validation logic for passwords manager.PasswordValidator = new PasswordValidator { RequiredLength = 6, RequireNonLetterOrDigit = true, RequireDigit = true, RequireLowercase = true, RequireUppercase = true, }; // Configure user lockout defaults manager.UserLockoutEnabledByDefault = true; manager.DefaultAccountLockoutTimeSpan = TimeSpan.FromMinutes(5); manager.MaxFailedAccessAttemptsBeforeLockout = 5; // Register two factor authentication providers. This application uses Phone and Emails as a step of receiving a code for verifying the user // You can write your own provider and plug it in here. manager.RegisterTwoFactorProvider("Phone Code", new PhoneNumberTokenProvider<ApplicationUser> { MessageFormat = "Your security code is {0}" }); manager.RegisterTwoFactorProvider("Email Code", new EmailTokenProvider<ApplicationUser> { Subject = "Security Code", BodyFormat = "Your security code is {0}" }); manager.EmailService = new EmailService(); manager.SmsService = new SmsService(); if (dataProtectionProvider != null) { manager.UserTokenProvider = new DataProtectorTokenProvider<ApplicationUser>(dataProtectionProvider.Create("ASP.NET Identity")); } return manager; }
public StoreManagerController(IPartsUnlimitedContext context) { db = context; }
public CategoryMenuComponent(IPartsUnlimitedContext context, IMemoryCache memoryCache) { _db = context; _cache = memoryCache; }
public CartSummaryComponent(IPartsUnlimitedContext context) { _db = context; }
public RaincheckQuery(IPartsUnlimitedContext context) { _context = context; }
public CustomerController(IPartsUnlimitedContext context) { _context = context; }
public RecommendationsController(IPartsUnlimitedContext context, IRecommendationEngine recommendationEngine, IWebsiteOptions websiteOptions) { _db = context; _recommendation = recommendationEngine; _option = websiteOptions; }
public StringContainsProductSearch(IPartsUnlimitedContext context) { _context = context; }
public ShoppingCartController(IPartsUnlimitedContext context, IAntiforgery antiforgery) { _db = context; _antiforgery = antiforgery; }
public StoreManagerController(IPartsUnlimitedContext context, IConnectionManager connectionManager, IMemoryCache memoryCache) { _db = context; _annoucementHub = connectionManager.GetHubContext <AnnouncementHub>(); _cache = memoryCache; }
public ShoppingCartController(IPartsUnlimitedContext context, ITelemetryProvider telemetryProvider, IAntiforgery antiforgery) { _db = context; _telemetry = telemetryProvider; _antiforgery = antiforgery; }
public ShoppingCart(IPartsUnlimitedContext db, IProductsRepository productsRepository) { _db = db; this.productsRepository = productsRepository; }
public CheckoutController(IPartsUnlimitedContext context, UserManager <ApplicationUser> userManager) { _userManager = userManager; _db = context; }
public ShoppingCartController(IPartsUnlimitedContext context, ITelemetryProvider telemetryProvider) { db = context; telemetry = telemetryProvider; }
public RecommendationsController(IPartsUnlimitedContext context, IRecommendationEngine recommendationEngine) { db = context; recommendation = recommendationEngine; }
public OrdersQuery(IPartsUnlimitedContext context, IProductsRepository productsRepository) { _db = context; this.productsRepository = productsRepository; }
public CheckoutController(IPartsUnlimitedContext context, UserManager <ApplicationUser> userManager, IConfiguration configuration) { _userManager = userManager; _db = context; Configuration = configuration; }
public ShoppingCartController(IPartsUnlimitedContext context, ITelemetryProvider telemetryProvider) { _db = context; _telemetry = telemetryProvider; }
public ShoppingCart(IPartsUnlimitedContext db) { _db = db; }
public HomeController(IPartsUnlimitedContext context) { _db = context; }
public ProductsController(IPartsUnlimitedContext context) { _context = context; }
public RaincheckQuery(IPartsUnlimitedContext context, IProductsRepository productsRepository) { _context = context; this.productsRepository = productsRepository; }
public AnnouncementComponent(IPartsUnlimitedContext context, IMemoryCache memoryCache) { _db = context; _cache = memoryCache; }
public CheckoutController(IPartsUnlimitedContext context) { db = context; }
public HomeController(IPartsUnlimitedContext context, IMemoryCache memoryCache) { _db = context; _cache = memoryCache; }
public StoreManagerController(IPartsUnlimitedContext context, IMemoryCache memoryCache) { _db = context; _cache = memoryCache; }
public CheckoutController(IPartsUnlimitedContext context, UserManager<ApplicationUser> userManager) { _userManager = userManager; _db = context; }
public StoreController(IPartsUnlimitedContext context, IMemoryCache memoryCache, IProductsRepository productsRepository) { _db = context; _cache = memoryCache; this.productsRepository = productsRepository; }
public OrdersQuery(IPartsUnlimitedContext context) { _db = context; }
public CheckoutController(IPartsUnlimitedContext context, IProductsRepository productsRepository) { _db = context; this.productsRepository = productsRepository; }
public static ShoppingCart GetCart(IPartsUnlimitedContext db, HttpContextBase context) { var cart = new ShoppingCart(db); cart.ShoppingCartId = cart.GetCartId(context); return cart; }
public StoreManagerController(IPartsUnlimitedContext context, ConnectionManager connectionManager, IMemoryCache memoryCache) { _db = context; _cache = memoryCache; }
public StoreManagerController(IPartsUnlimitedContext context, IConnectionManager connectionManager, IMemoryCache memoryCache) { _db = context; _annoucementHub = connectionManager.GetHubContext<AnnouncementHub>(); _cache = memoryCache; }
public CheckoutController(IPartsUnlimitedContext context) { _db = context; }
public StoreController(IPartsUnlimitedContext context) { db = context; }
public StoreController(IPartsUnlimitedContext context, IMemoryCache memoryCache) { _db = context; _cache = memoryCache; }
public static UserManager <ApplicationUser> CreateUserManager(IDataProtectionProvider dataProtectionProvider, IPartsUnlimitedContext context) { var manager = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>((DbContext)context)); // Configure validation logic for usernames manager.UserValidator = new UserValidator <ApplicationUser>(manager) { AllowOnlyAlphanumericUserNames = false, RequireUniqueEmail = true }; // Configure validation logic for passwords manager.PasswordValidator = new PasswordValidator { RequiredLength = 6, RequireNonLetterOrDigit = true, RequireDigit = true, RequireLowercase = true, RequireUppercase = true, }; // Configure user lockout defaults manager.UserLockoutEnabledByDefault = true; manager.DefaultAccountLockoutTimeSpan = TimeSpan.FromMinutes(5); manager.MaxFailedAccessAttemptsBeforeLockout = 5; // Register two factor authentication providers. This application uses Phone and Emails as a step of receiving a code for verifying the user // You can write your own provider and plug it in here. manager.RegisterTwoFactorProvider("Phone Code", new PhoneNumberTokenProvider <ApplicationUser> { MessageFormat = "Your security code is {0}" }); manager.RegisterTwoFactorProvider("Email Code", new EmailTokenProvider <ApplicationUser> { Subject = "Security Code", BodyFormat = "Your security code is {0}" }); manager.EmailService = new EmailService(); manager.SmsService = new SmsService(); if (dataProtectionProvider != null) { manager.UserTokenProvider = new DataProtectorTokenProvider <ApplicationUser>(dataProtectionProvider.Create("ASP.NET Identity")); } return(manager); }