Example #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)
 {
     FooConfiguration.Configure(app, host =>
                                host.UseStaticFiles()
                                .UseAuthentication()
                                .UseExceptionHandler("/Home/Error"));
 }
Example #2
0
 // 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();
 }
Example #3
0
 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);
            });
        }
Example #5
0
 public void Configure(IApplicationBuilder app)
 {
     FooConfiguration.Configure(app, host => host.UseAuthentication());
 }
Example #6
0
 public void Configure(IApplicationBuilder app)
 {
     FooConfiguration.Configure(app, host => host);
 }
Example #7
0
 public void ConfigureServices(IServiceCollection services)
 {
     FooConfiguration.ConfigureServices(services);
 }
 public void ConfigureServices(IServiceCollection services)
 {
     FooConfiguration.ConfigureServices(services)
     .AddAuthentication(defaultScheme: "TestServer")
     .AddTestServerAuthentication();
 }