예제 #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(
            IApplicationBuilder app,
            IHostingEnvironment env,
            ILoggerFactory loggerFactory,
            MoneyAintFunnyContext context,
            ISettingsService settings,
            UserManager <IdentityUser> userManager,
            RoleManager <IdentityRole> roleManager)
        {
            loggerFactory.AddConsole();
            loggerFactory.AddDebug();

            loggerFactory.AddNLog();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler();
            }

            app.UseAuthentication();

            context.EnsureSeedDataForContext(userManager, roleManager);

            app.UseStatusCodePages();

            app.UseMvc();
        }
예제 #2
0
 public UserSecurityManager(
     MoneyAintFunnyContext context,
     UserManager <IdentityUser> userManager,
     SignInManager <IdentityUser> signInManager,
     RoleManager <IdentityRole> roleManager,
     ISettingsService settingsService)
 {
     _context         = context;
     _userManager     = userManager;
     _signInManager   = signInManager;
     _roleManager     = roleManager;
     _settingsService = settingsService;
 }