Ejemplo n.º 1
0
 // This method gets called by the runtime. Use this method to add services to the container.
 // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
 public void ConfigureServices(IServiceCollection services)
 {
     var builder = services.AddIdentityServer()
                   .AddDeveloperSigningCredential()
                   .AddInMemoryIdentityResources(Config.GetIdentityResources())
                   .AddInMemoryApiResources(Config.GetApis())
                   .AddInMemoryApiScopes(Config.GetScopes())
                   .AddInMemoryClients(Config.GetClients());
 }
Ejemplo n.º 2
0
 // This method gets called by the runtime. Use this method to add services to the container.
 // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
 public void ConfigureServices(IServiceCollection services)
 {
     var builder = services.AddIdentityServer()
                   .AddDeveloperSigningCredential()
                   .AddInMemoryIdentityResources(Config.GetIdentityResources())
                   .AddInMemoryApiResources(Config.GetApis())
                   .AddInMemoryApiScopes(Config.GetScopes())
                   .AddInMemoryClients(Config.GetClients())
                   //.AddTestUsers(Config.GetUsers())
                   .AddResourceOwnerValidator <ResourceOwnerPasswordValidator>();
 }
Ejemplo n.º 3
0
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc();

            // For use with CachedPropertiesDataFormat. In load-balanced scenarios
            // you should use a persistent cache such as Redis or SQL Server.
            services.AddDistributedMemoryCache();

            // configure identity server with in-memory stores, keys, clients and scopes
            services.AddDeveloperIdentityServer()
            .AddInMemoryScopes(Config.GetScopes())
            .AddInMemoryClients(Config.GetClients())
            .AddInMemoryUsers(Config.GetUsers());
        }