Exemplo n.º 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, ILoggerFactory loggerFactory,
                              IdentityProviderUserContext userContext, ConfigurationDbContext configurationDbContext, PersistedGrantDbContext persistedGrantDbContext)
        {
            loggerFactory.AddConsole();
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            configurationDbContext.Database.Migrate();
            configurationDbContext.EnsureSeedDataForContext();

            persistedGrantDbContext.Database.Migrate();

            userContext.Database.Migrate();
            userContext.EnsureSeedDataForContext();

            app.UseIdentityServer(); // Try localhost:59866/.well-known/openid-configuration

            app.UseStaticFiles();

            app.UseMvcWithDefaultRoute();
        }
Exemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_context != null)
         {
             _context.Dispose();
             _context = null;
         }
     }
 }
Exemplo n.º 3
0
 public IdentityProviderUserRepository(IdentityProviderUserContext context)
 {
     _context = context;
 }