Inheritance: System.Configuration.ConfigurationSection
        public MembershipRebootConfiguration(SecuritySettings securitySettings, IFactory factory)
        {
            if (securitySettings == null) throw new ArgumentNullException("securitySettings");
            if (factory == null) throw new ArgumentNullException("factory");

            this.factory = factory;
            this.SecuritySettings = securitySettings;
        }
 public static SecuritySettings FromConfiguration()
 {
     var instance = new SecuritySettings();
     var configSection = GetConfigSection();
     if (configSection != null)
     {
         foreach (var prop in configSection.Properties.Cast<ConfigurationProperty>())
         {
             var val = configSection[prop];
             instance[prop] = val;
         }
     }
     return instance;
 }
        void InitFromConfiguration(MembershipRebootConfiguration configuration, IUserAccountRepository userAccountRepository = null)
        {
            this.configuration = configuration;
            this.userRepository =
                new UserAccountRepository(
                    userAccountRepository ?? configuration.CreateUserAccountRepository(), 
                    configuration.EventBus);
            this.securitySettings = configuration.SecuritySettings;

            ConfigureRequiredValidation();
            usernameValidator.Add(configuration.UsernameValidator);
            emailValidator.Add(configuration.EmailValidator);
            passwordValidator.Add(configuration.PasswordValidator);
        }
 public MembershipRebootConfiguration(SecuritySettings securitySettings)
 {
     if (securitySettings == null) throw new ArgumentNullException("securitySettings");
     
     this.MultiTenant = securitySettings.MultiTenant;
     this.DefaultTenant = securitySettings.DefaultTenant;
     this.EmailIsUsername = securitySettings.EmailIsUsername;
     this.UsernamesUniqueAcrossTenants = securitySettings.UsernamesUniqueAcrossTenants;
     this.RequireAccountVerification = securitySettings.RequireAccountVerification;
     this.AllowLoginAfterAccountCreation = securitySettings.AllowLoginAfterAccountCreation;
     this.AccountLockoutFailedLoginAttempts = securitySettings.AccountLockoutFailedLoginAttempts;
     this.AccountLockoutDuration = securitySettings.AccountLockoutDuration;
     this.AllowAccountDeletion = securitySettings.AllowAccountDeletion;
     this.PasswordHashingIterationCount = securitySettings.PasswordHashingIterationCount;
     this.PasswordResetFrequency = securitySettings.PasswordResetFrequency;
 }
 static SecuritySettings()
 {
     Instance = FromConfiguration();
 }
 public MembershipRebootConfiguration(SecuritySettings securitySettings, IUserAccountRepository userAccountRepository)
     : this(securitySettings, new DelegateFactory(()=>userAccountRepository))
 {
     if (userAccountRepository == null) throw new ArgumentNullException("userAccountRepository");
 }
 public MembershipRebootConfiguration(SecuritySettings securitySettings, Func<IUserAccountRepository> factoryFunc)
     : this(securitySettings, new DelegateFactory(factoryFunc))
 {
     if (factoryFunc == null) throw new ArgumentNullException("factoryFunc");
 }
 public MembershipRebootConfiguration(SecuritySettings securitySettings)
 {
     if (securitySettings == null) throw new ArgumentNullException("securitySettings");
     this.SecuritySettings = securitySettings;
 }
 static SecuritySettings()
 {
     Instance = FromConfiguration();
 }