public void Configuration(IAppBuilder app) { LogProvider.SetCurrentLogProvider(new TraceSourceLogProvider()); app.Map("/admin", adminApp => { var factory = new IdentityAdminServiceFactory { ClientService = new Registration <IClientService, InMemoryClientService>(), IdentityResourceService = new Registration <IIdentityResourceService, InMemoryIdentityResourceService>(), ApiResourceService = new Registration <IApiResourceService, InMemoryApiResourceService>() }; var rand = new System.Random(); var clients = ClientSeeder.Get(rand.Next(1000, 3000)); var identityResources = IdentityResourceSeeder.Get(rand.Next(25)); var apiResources = ApiResourceSeeder.Get(rand.Next(54)); factory.Register(new Registration <ICollection <InMemoryClient> >(clients)); factory.Register(new Registration <ICollection <InMemoryIdentityResource> >(identityResources)); factory.Register(new Registration <ICollection <InMemoryApiResource> >(apiResources)); adminApp.UseIdentityAdmin(new IdentityAdminOptions { Factory = factory }); }); }
private static IdentityAdminServiceFactory CreateIdentityAdminServiceFactory() { var factory = new IdentityAdminServiceFactory { IdentityAdminService = new Registration <IIdentityAdminService, InMemoryIdentityManagerService>() }; var rand = new System.Random(); var clients = ClientSeeder.Get(rand.Next(1000, 3000)); var scopes = ScopeSeeder.Get(rand.Next(15)); factory.Register(new Registration <ICollection <InMemoryScope> >(scopes)); factory.Register(new Registration <ICollection <InMemoryClient> >(clients)); return(factory); }
public IdentityAdminOptions GetAdminOptions() { var factory = new IdentityAdminServiceFactory { IdentityAdminService = new Registration <IIdentityAdminService, InMemoryIdentityAdminService>() }; var rand = new System.Random(); var clients = ClientSeeder.Get(rand.Next(1000, 3000)); var scopes = ScopeSeeder.Get(rand.Next(15)); factory.Register(new Registration <ICollection <InMemoryScope> >(scopes)); factory.Register(new Registration <ICollection <InMemoryClient> >(clients)); return(new IdentityAdminOptions { Factory = factory }); }
public IdentityAdminOptions GetAdminOptions() { var factory = new IdentityAdminServiceFactory { IdentityAdminService = new Registration<IIdentityAdminService, InMemoryIdentityAdminService>() }; var rand = new System.Random(); var clients = ClientSeeder.Get(rand.Next(1000, 3000)); var scopes = ScopeSeeder.Get(rand.Next(15)); factory.Register(new Registration<ICollection<InMemoryScope>>(scopes)); factory.Register(new Registration<ICollection<InMemoryClient>>(clients)); return new IdentityAdminOptions { Factory = factory }; }
public void Configuration(IAppBuilder app) { LogProvider.SetCurrentLogProvider(new TraceSourceLogProvider()); app.Map("/admin", adminApp => { var factory = new IdentityAdminServiceFactory { IdentityAdminService = new Registration<IIdentityAdminService, InMemoryIdentityManagerService>() }; var rand = new System.Random(); var clients = ClientSeeder.Get(rand.Next(1000, 3000)); var scopes = ScopeSeeder.Get(rand.Next(15)); factory.Register(new Registration<ICollection<InMemoryScope>>(scopes)); factory.Register(new Registration<ICollection<InMemoryClient>>(clients)); adminApp.UseIdentityAdmin(new IdentityAdminOptions { Factory = factory }); }); }