Пример #1
0
        public static void RegisterInMongoDb(this List <Client> clients, ServiceOptions options)
        {
            MongoDbContext     context = new MongoDbContext(options.ConnectionStringName, new[] { "of", "IdentityServer3" });
            MongoDbClientStore store   = new MongoDbClientStore(context);

            foreach (Client client in clients)
            {
                bool exists = store.Exists(x => x.Id == client.ClientId);
                if (exists)
                {
                    continue;
                }
                store.Create(new MongoDbClient(client));
            }
        }
Пример #2
0
 public ClientConfigurationCorsPolicyService(IClientStore store)
 {
     _store = (MongoDbClientStore)store;
 }