예제 #1
0
 public AuthenticateController(UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, IConfiguration configuration, AbracadabraContext context)
 {
     this.userManager = userManager;
     this.roleManager = roleManager;
     _context         = context;
     _configuration   = configuration;
 }
 public SubjectsController(AbracadabraContext context, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager)
 {
     _context         = context;
     this.userManager = userManager;
     this.roleManager = roleManager;
 }
예제 #3
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, AbracadabraContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            // NOTE: Re-enable CORS when deploying
            app.UseCors(options => options.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseAuthentication();
            app.UseAuthorization();

            MyIdentityDataInitializer.SeedData(userManager, roleManager, context);

            DbInitializer.Initialize(context);

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
 public FlaggedEntitiesController(AbracadabraContext context, UserManager <ApplicationUser> userManager)
 {
     _context          = context;
     this._userManager = userManager;
 }
 public UsersController(UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, AbracadabraContext context)
 {
     this._userManager = userManager;
     this._roleManager = roleManager;
     _context          = context;
 }
예제 #6
0
 public EndorsedAnswersController(AbracadabraContext context, UserManager <ApplicationUser> userManager)
 {
     _context          = context;
     this._userManager = userManager;
 }