public AzureBlobStorageDigitalAssetHandler(IdentityServiceContext context, ICache cache, Lazy <IAzureBlobStorageConfiguration> lazyConfiguration)
 {
     _context        = context;
     _cache          = cache;
     _configuration  = lazyConfiguration.Value;
     _storageAccount = new CloudStorageAccount(new StorageCredentials(_configuration.AccountName, _configuration.KeyValue), true);
 }
        public static void Seed(IdentityServiceContext context)
        {
            context.Tenants.AddOrUpdate(x => x.Name, new Tenant()
            {
                Name     = "Default",
                UniqueId = new Guid("50848e1d-f3ec-486a-b25c-7f6cf1ef7c93")
            });

            context.SaveChanges();
        }
        public UserRepositoryTests()
        {
            _container = new ServiceCollection()
                         .AddSingleton(Mock.Of <ICapPublisher>())
                         .AddDbContext <IdentityServiceContext>(options =>
            {
                options.UseInMemoryDatabase("xunit-user-repository-test-database");
            }).BuildServiceProvider(false);

            _context = _container.GetRequiredService <IdentityServiceContext>();
        }
        public static void Seed(IdentityServiceContext context)
        {
            var systemRole = context.Roles.First(x => x.Name == Roles.SYSTEM);
            var roles      = new List <Role>();
            var tenant     = context.Tenants.Single(x => x.Name == "Default");

            roles.Add(systemRole);

            context.Users.AddOrUpdate(x => x.Username, new User()
            {
                Username = "******",
                Password = new EncryptionService().TransformPassword("system"),
                Roles    = roles,
                TenantId = tenant.Id
            });

            context.SaveChanges();
        }
        public static void Seed(IdentityServiceContext context)
        {
            context.Roles.AddOrUpdate(x => x.Name, new Role()
            {
                Name = Roles.SYSTEM
            });

            context.Roles.AddOrUpdate(x => x.Name, new Role()
            {
                Name = Roles.ACCOUNT_HOLDER
            });

            context.Roles.AddOrUpdate(x => x.Name, new Role()
            {
                Name = Roles.DEVELOPMENT
            });

            context.SaveChanges();
        }
 public Handler(IdentityServiceContext context, ICache cache)
 {
     _context = context;
     _cache   = cache;
 }
Пример #7
0
 public RemoveSubscriptionHandler(IdentityServiceContext context, ICache cache)
 {
     _context = context;
     _cache   = cache;
 }
Пример #8
0
 public UserRepository(IdentityServiceContext context)
 => _context = context.NotNull(nameof(context));
Пример #9
0
 public Handler(IdentityServiceContext context, IEventBus bus)
 {
     _context = context;
     _bus     = bus;
 }
Пример #10
0
 public GetTenantByIdHandler(IdentityServiceContext context, ICache cache)
 {
     _context = context;
     _cache   = cache;
 }
 public AddOrUpdateFeatureHandler(IdentityServiceContext context, ICache cache)
 {
     _context = context;
     _cache   = cache;
 }
 public Handler(IdentityServiceContext context, ICache cache, Lazy <IAuthConfiguration> lazyAuthConfiguration)
 {
     _context           = context;
     _cache             = cache;
     _authConfiguration = lazyAuthConfiguration.Value;
 }
Пример #13
0
 public RemoveFeatureHandler(IdentityServiceContext context, ICache cache)
 {
     _context = context;
     _cache   = cache;
 }
 public SendRegistrationConfirmationHandler(IdentityServiceContext context, ICache cache)
 {
     _context = context;
     _cache   = cache;
 }
 public GetDigitalAssetByUniqueIdHandler(IdentityServiceContext context, ICache cache)
 {
     _context = context;
     _cache   = cache;
 }