Exemplo n.º 1
0
 internal static IdentityServerServiceFactory ConfigureInMemoryServices(this IdentityServerServiceFactory factory)
 {
     factory.UseInMemoryUsers(UsersFactory.Get())
     .UseInMemoryClients(ClientsFactory.Build())
     .UseInMemoryScopes(ScopesFactory.Build());
     return(factory);
 }
Exemplo n.º 2
0
 public static IdentityServerServiceFactory ConfigureRedisServices(this IdentityServerServiceFactory factory)
 {
     factory.ClientStore = new Registration <IClientStore>(new InMemoryClientStore(ClientsFactory.Build()));
     factory.ScopeStore  = new Registration <IScopeStore>(new InMemoryScopeStore(ScopesFactory.Build()));
     factory.UserService = new Registration <IUserService>(new InMemoryUserService(UsersFactory.Get()));
     factory.ConfigureClientStoreCache(new Registration <ICache <Client> >(new ClientStoreCache(LazyConnection.Value)));
     factory.ConfigureScopeStoreCache(new Registration <ICache <IEnumerable <Scope> > >(new ScopeStoreCache(LazyConnection.Value)));
     factory.ConfigureUserServiceCache(new Registration <ICache <IEnumerable <Claim> > >(new UserServiceCache(LazyConnection.Value)));
     factory.ConfigureOperationalRedisStoreServices(CacheConnection);
     return(factory);
 }