public MembershipRebootIdentityManagerService(
            UserAccountService <TAccount> userAccountService,
            IUserAccountQuery <TAccount> userQuery,
            GroupService <TGroup> groupService,
            IGroupQuery groupQuery,
            bool includeAccountProperties = true)
        {
            if (userAccountService == null)
            {
                throw new ArgumentNullException("userAccountService");
            }
            if (userQuery == null)
            {
                throw new ArgumentNullException("userQuery");
            }

            this.userAccountService = userAccountService;
            this.userQuery          = userQuery;

            this.groupService = groupService;
            this.groupQuery   = groupQuery;

            this.metadataFunc = () => Task.FromResult(GetStandardMetadata(includeAccountProperties));

            if (typeof(RelationalUserAccount).IsAssignableFrom(typeof(TAccount)))
            {
                this.Filter = RelationalUserAccountQuery <TAccount> .DefaultFilter;
                this.Sort   = RelationalUserAccountQuery <TAccount> .DefaultSort;
            }
            else
            {
                this.Filter = DefaultFilter;
                this.Sort   = DefaultSort;
            }
        }
 public MembershipRebootIdentityManagerService(
     UserAccountService <TAccount> userAccountService,
     IUserAccountQuery <TAccount> userQuery,
     GroupService <TGroup> groupService,
     IGroupQuery groupQuery,
     UserManagementMetadata metadata)
     : this(userAccountService, userQuery, groupService, groupQuery, () => Task.FromResult(metadata))
 {
 }
        public IdentityRepository()
        {
            var settings = SecuritySettings.FromConfiguration();
            settings.RequireAccountVerification = false;
            var config = new MembershipRebootConfiguration(settings);
            var uarepo = new BrockAllen.MembershipReboot.Ef.DefaultUserAccountRepository();
            this.userSvc = new UserAccountService(config, uarepo);
            this.userQuery = uarepo;

            var grpRepo = new BrockAllen.MembershipReboot.Ef.DefaultGroupRepository();
            this.groupSvc = new GroupService(config.DefaultTenant, grpRepo);
            this.groupQuery = grpRepo;
        }
 public MembershipRebootIdentityManagerService(
     UserAccountService <TAccount> userAccountService,
     IUserAccountQuery <TAccount> userQuery,
     GroupService <TGroup> groupService,
     IGroupQuery groupQuery,
     Func <Task <IdentityManagerMetadata> > metadataFunc)
     : this(userAccountService, userQuery, groupService, groupQuery)
 {
     if (metadataFunc == null)
     {
         throw new ArgumentNullException("metadataFunc");
     }
     this.metadataFunc = metadataFunc;
 }
Exemple #5
0
        public IdentityRepository()
        {
            var settings = SecuritySettings.FromConfiguration();

            settings.RequireAccountVerification = false;
            var config = new MembershipRebootConfiguration(settings);
            var uarepo = new BrockAllen.MembershipReboot.Ef.DefaultUserAccountRepository();

            this.userSvc   = new UserAccountService(config, uarepo);
            this.userQuery = uarepo;

            var grpRepo = new BrockAllen.MembershipReboot.Ef.DefaultGroupRepository();

            this.groupSvc   = new GroupService(config.DefaultTenant, grpRepo);
            this.groupQuery = grpRepo;
        }
Exemple #6
0
        public UserManager(
            UserAccountService <TAccount> userAccountService,
            IUserAccountQuery query,
            IDisposable cleanup)
        {
            if (userAccountService == null)
            {
                throw new ArgumentNullException("userAccountService");
            }
            if (query == null)
            {
                throw new ArgumentNullException("query");
            }

            this.userAccountService = userAccountService;
            this.query   = query;
            this.cleanup = cleanup;
        }
Exemple #7
0
 public GetToken(IUserAccountQuery userAccountQuery, ILogger <GetToken> logger)
 {
     this.Logger           = logger;
     this.UserAccountQuery = userAccountQuery;
 }
 public HomeController(IUserAccountQuery query, UserAccountService<CustomUserAccount> userAccountService)
 {
     this.userAccountService = userAccountService;
     this.query = query;
 }
 public HomeController(UserAccountService <RelationalUserAccount> userAccountService)
 {
     this.userAccountService = userAccountService;
     this.query = userAccountService.Query;
 }
 public HomeController(IUserAccountQuery query, UserAccountService <CustomUserAccount> userAccountService)
 {
     this.userAccountService = userAccountService;
     this.query = query;
 }
 public AdminHomeController(IUserAccountQuery query, UserAccountService userAccountService)
 {
     this.userAccountService = userAccountService;
     this.query = query;
 }
 public HomeController(IUserAccountQuery query, UserAccountService<HierarchicalUserAccount> userAccountService)
 {
     this.userAccountService = userAccountService;
     this.query = query;
 }
 public HomeController(UserAccountService<RelationalUserAccount> userAccountService)
 {
     this.userAccountService = userAccountService;
     this.query = userAccountService.Query;
 }
 public HomeController(IUserAccountQuery query, UserAccountService <HierarchicalUserAccount> userAccountService)
 {
     this.userAccountService = userAccountService;
     this.query = query;
 }