public MongoDbClientStoreTests(MongoSetup mongoSetup) : base(mongoSetup)
 {
     _migrator       = A.Fake <IClientStoreMigrator>();
     _collectionName = "clients_" + Guid.NewGuid();
     _encryptionKey  = new SharedSecretEncryptionKey("The_Big_Secret");
     _sut            = new MongoDbClientStore(new MongoDatabaseClientProvider(Database), _collectionName, _encryptionKey, _migrator);
 }
Ejemplo n.º 2
0
 public MongoDbClientStoreTests(MongoSetup mongoSetup) : base(mongoSetup)
 {
     _migrator       = A.Fake <IClientStoreMigrator>();
     _collectionName = "clients_" + Guid.NewGuid();
     _encryptionKey  = new SharedSecretEncryptionKey("The_Big_Secret");
     _signatureAlgorithmDataRecordConverter = new SignatureAlgorithmDataRecordConverter(new FakeStringProtectorFactory());
     _sut = new MongoDbClientStore(new MongoDatabaseClientProvider(Database), _collectionName, _encryptionKey, _migrator, _signatureAlgorithmDataRecordConverter);
 }
        public MongoDbNonceStoreTests(MongoSetup mongoSetup) : base(mongoSetup)
        {
            _collectionName = "nonces";
            _mongoDatabaseClientProvider = new MongoDatabaseClientProvider(Database);
            _sut = new MongoDbNonceStore(_mongoDatabaseClientProvider, _collectionName);

            _now = new DateTimeOffset(
                DateTimeOffset.UtcNow.Year,
                DateTimeOffset.UtcNow.Month,
                DateTimeOffset.UtcNow.Day,
                DateTimeOffset.UtcNow.Hour,
                DateTimeOffset.UtcNow.Minute,
                DateTimeOffset.UtcNow.Second,
                DateTimeOffset.UtcNow.Millisecond,
                TimeSpan.Zero);
        }
Ejemplo n.º 4
0
 public CompositionTests(MongoSetup mongoSetup)
     : base(mongoSetup)
 {
     _connectionString = mongoSetup.MongoServerConnectionString.TrimEnd('/') + '/' + mongoSetup.DatabaseName;
     _provider         = new ServiceCollection()
                         .AddHttpMessageSignatureVerification()
                         .UseMongoDbClientStore(new MongoDbClientStoreSettings {
         CollectionName             = "clients",
         ConnectionString           = _connectionString,
         ClientCacheEntryExpiration = TimeSpan.FromMinutes(1)
     })
                         .UseMongoDbNonceStore(new MongoDbNonceStoreSettings {
         CollectionName   = "nonces",
         ConnectionString = _connectionString
     })
                         .Services
                         .BuildServiceProvider();
 }
Ejemplo n.º 5
0
        public MongoIntegrationTest(MongoSetup mongoSetup)
        {
            var client = MongoClient.Create(mongoSetup.MongoServerConnectionString);

            Database = client.GetDatabase(mongoSetup.DatabaseName);
        }
Ejemplo n.º 6
0
 public Get(MongoSetup mongoSetup) : base(mongoSetup)
 {
 }
Ejemplo n.º 7
0
 public Register(MongoSetup mongoSetup) : base(mongoSetup)
 {
 }
Ejemplo n.º 8
0
 public MongoDbClientStoreTests(MongoSetup mongoSetup) : base(mongoSetup)
 {
     _collectionName = "clients";
     _sut            = new MongoDbClientStore(new MongoDatabaseClientProvider(Database), _collectionName);
 }
Ejemplo n.º 9
0
 public Construction(MongoSetup mongoSetup) : base(mongoSetup)
 {
 }