Exemple #1
0
 // This method gets called by the runtime. Use this method to add services to the container.
 public void ConfigureServices(IServiceCollection services)
 {
     services.AddIdentityServer()
     .AddDeveloperSigningCredential()                             //添加登录证书
     .AddInMemoryIdentityResources(Config.GetIdentityResources()) // 添加IdentityResources
     .AddInMemoryApiResources(Config.GetApiResources())
     .AddInMemoryClients(Config.GetClients())
     .AddTestUsers(Config.GeTestUsers());
     services.AddScoped <ConsentService>();
     services.AddMvc();
 }