Example #1
0
 public void ConfigureServices(IServiceCollection services)
 {
     services.AddMvc();
     services.AddIdentityServer()
     .AddDeveloperSigningCredential()
     .AddInMemoryClients(IdentityServerConfiguration.GetClientScope())
     .AddInMemoryApiResources(IdentityServerConfiguration.GetApiResources())
     .AddInMemoryIdentityResources(IdentityServerConfiguration.GetIdentityResources())
     .AddTestUsers(IdentityServerConfiguration.GetUsers().ToList());
 }
Example #2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

            services.AddIdentityServer()
            .AddInMemoryIdentityResources(IdentityServerConfiguration.GetIdentityResources())
            .AddInMemoryApiResources(IdentityServerConfiguration.GetApis())
            .AddInMemoryClients(IdentityServerConfiguration.GetClients())
            .AddTestUsers(IdentityServerConfiguration.GetUsers())
            .AddDeveloperSigningCredential();
        }