// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { FooConfiguration.Configure(app, host => host.UseStaticFiles() .UseAuthentication() .UseExceptionHandler("/Home/Error")); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { FooConfiguration .ConfigureServices(services) .AddAuthentication() .AddJwtBearer(); }
public void ConfigureServices(IServiceCollection services) { FooConfiguration.ConfigureServices(services) .AddDbContext <FooDbContext>(options => { options.UseSqlServer(@"Server=LRUIZ-LAPTOP\SQLEXPRESS;Database=Foo;Integrated Security=true", sqlOptions => { sqlOptions.MigrationsAssembly(typeof(Bar).Assembly.GetName().Name); }); }) .AddAuthentication(defaultScheme: "TestServer") .AddTestServerAuthentication(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { FooConfiguration.Configure(app, host => { if (env.IsDevelopment()) { host.UseBrowserLink(); host.UseDeveloperExceptionPage(); } else { host.UseExceptionHandler("/Home/Error"); } host.UseStaticFiles(); return(host); }); }
public void Configure(IApplicationBuilder app) { FooConfiguration.Configure(app, host => host.UseAuthentication()); }
public void Configure(IApplicationBuilder app) { FooConfiguration.Configure(app, host => host); }
public void ConfigureServices(IServiceCollection services) { FooConfiguration.ConfigureServices(services); }
public void ConfigureServices(IServiceCollection services) { FooConfiguration.ConfigureServices(services) .AddAuthentication(defaultScheme: "TestServer") .AddTestServerAuthentication(); }