// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, AbrantosContext context, UserManager <User> userManager, RoleManager <Role> roleManager) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseCors("CorsPolicy"); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Abrantos API"); c.RoutePrefix = string.Empty; }); // app.UseHttpsRedirection(); new IdentityInitializer(context, userManager, roleManager) .Initialize().Wait(); app.UseAuthentication(); app.UseMvc(); }
public AuthenticationController(AbrantosContext context, UserManager <User> userManager, SignInManager <User> signInManager, IEmailSender emailSender) { _context = context; _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; }
public DailyRegisterController(AbrantosContext context, IHttpContextAccessor httpContext) { _context = context; _httpContext = httpContext; }
public AccountService(AbrantosContext context, UserManager <User> userManager) { _context = context; _userManager = userManager; }