public MaximumLoginAttemptSecurityPolicy(int accountLockoutThreshold, int lockoutDurationMinutes, IUserAccountCommandRepository commandRepository)
        {
            this.accountLockoutThreshold = accountLockoutThreshold;
            this.lockoutDurationMinutes  = lockoutDurationMinutes;

            this.commandRepository = commandRepository;
        }
예제 #2
0
        public LoginProcess(
            IUserAccountCommandRepository userCommandRepository,
            IUserAccountQueryRepository userQueryRepository,
            int passwordExpiryDays,
            int accountLockoutThreshold,
            int lockoutDurationMinutes
            )
        {
            this.userCommandRepository   = userCommandRepository;
            this.userQueryRepository     = userQueryRepository;
            this.passwordExpiryDays      = passwordExpiryDays;
            this.accountLockoutThreshold = accountLockoutThreshold;
            this.lockoutDurationMinutes  = lockoutDurationMinutes;

            if (null == this.userCommandRepository)
            {
                throw new NullReferenceException();
            }
            if (null == this.userQueryRepository)
            {
                throw new NullReferenceException();
            }
        }
예제 #3
0
 public LoginProcess()
 {
     userCommandRepository = new XmlUserAccountCommandRepository(connectionString);
     userQueryRepository   = new XmlUserAccountQueryRepository(connectionString);
 }