// 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, MarvinUserContext marvinUserContext, ConfigurationDbContext configurationDbContext, PersistedGrantDbContext persistedGrantDbContext) { loggerFactory.AddConsole(); if (env.IsDevelopment()) { loggerFactory.AddDebug(); app.UseDeveloperExceptionPage(); } else { persistedGrantDbContext.Database.Migrate(); configurationDbContext.Database.Migrate(); configurationDbContext.EnsureSeedDataForContext(); marvinUserContext.Database.Migrate(); marvinUserContext.EnsureSeedDataForContext(); } app.UseIdentityServer(); app.UseAuthentication(); app.UseStaticFiles(); app.UseMvcWithDefaultRoute(); }
// 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, MarvinUserContext marvinUserContext, ConfigurationDbContext configurationDbContext, PersistedGrantDbContext persistedGrantDbContext) { loggerFactory.AddConsole(); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } configurationDbContext.Database.Migrate(); configurationDbContext.EnsureSeedDataForContext(); marvinUserContext.Database.Migrate(); marvinUserContext.EnsureSeedDataForContext(); persistedGrantDbContext.Database.Migrate(); app.UseStaticFiles(); app.UseIdentityServer(); app.UseMvcWithDefaultRoute(); //app.Run(async (context) => //{ // await context.Response.WriteAsync("Hello World!"); //}); }
protected virtual void Dispose(bool disposing) { if (disposing) { if (_context != null) { _context.Dispose(); _context = null; } } }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, MarvinUserContext marvinUserContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } marvinUserContext.Database.Migrate(); marvinUserContext.EnsureSeedDataForContext(); app.UseIdentityServer(); app.UseStaticFiles(); app.UseMvcWithDefaultRoute(); }
// 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, MarvinUserContext marvinUserContext) { loggerFactory.AddConsole(); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } marvinUserContext.Database.EnsureCreated(); marvinUserContext.EnsureSeedDataForContext(); app.UseIdentityServer(); app.UseStaticFiles(); app.UseMvcWithDefaultRoute(); }
// 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, MarvinUserContext marvinUserContext, ConfigurationDbContext configurationDbContext, PersistedGrantDbContext persistedGrantDbContext) { loggerFactory.AddConsole(); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } configurationDbContext.Database.Migrate(); configurationDbContext.EnsureSeedDataForContext(); persistedGrantDbContext.Database.Migrate(); marvinUserContext.Database.Migrate(); marvinUserContext.EnsureSeedDataForContext(); app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationScheme = "idsrv.2FA", AutomaticAuthenticate = false, AutomaticChallenge = false }); app.UseIdentityServer(); app.UseFacebookAuthentication(new FacebookOptions { AuthenticationScheme = "Facebook", DisplayName = "Facebook", SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme, AppId = "1570475679676847", AppSecret = "5b9f4bca5da29e234b706040aca883d3" }); app.UseStaticFiles(); app.UseMvcWithDefaultRoute(); }
public MarvinUserRepository(MarvinUserContext context) { _context = context; }
// 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, MarvinUserContext marvinUserContext, ConfigurationDbContext configurationDbContext) { loggerFactory.AddConsole(); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } configurationDbContext.Database.Migrate(); configurationDbContext.EnsureSeedDataForContext(); marvinUserContext.Database.Migrate(); marvinUserContext.EnsureSeedDataForContext(); app.UseIdentityServer(); // app.UseAuthentication(); //app.UseGoogleAuthentication(new GoogleOptions //{ // ClientId = "428263776906-migfnplkenutb2c9k79gi6kemcu2eqh3.apps.googleusercontent.com", // ClientSecret= "IVdCZw7YM_m0YzNnHlE0aX91", // SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme //}); app.UseStaticFiles(); app.UseMvcWithDefaultRoute(); //app.Run(async (context) => //{ // await context.Response.WriteAsync("Hello World!"); //}); }