コード例 #1
0
 public PasswordHistory(string userName,
                        Password currentPassword,
                        List <Password> previousPasswords,
                        IPasswordRuleSet passwordRules)
 {
     UserName          = userName;
     CurrentPassword   = currentPassword;
     PreviousPasswords = previousPasswords;
     PasswordRules     = passwordRules;
 }
コード例 #2
0
        public PasswordHistoryTests()
        {
            _previousPasswords = _previousPasswords = new List <Password>()
            {
                new Password("password1", new DateTime(2020, 04, 04)),
                new Password(UsedPassword, new DateTime(2020, 01, 01)),
                new Password("password2", new DateTime(2020, 03, 03)),
                new Password("password3", new DateTime(2020, 02, 02))
            };
            _itContainsUsedPassword = $"A{_previousPasswords[0].PasswordText}B!";

            _highProfileUserPasswordRules = new HighProfileUserPasswordRules();

            _highProfileUserPasswordHistory
                = new PasswordHistory("UserName1", new Password(CurrentPassword), _previousPasswords, _highProfileUserPasswordRules);
        }
コード例 #3
0
 public PasswordHistoryUsingDomainEvents(string userName,
                                         Password currentPassword,
                                         List <Password> previousPasswords,
                                         IPasswordRuleSet passwordRules) : base(userName, currentPassword, previousPasswords, passwordRules)
 {
 }
コード例 #4
0
 public PasswordHistoryBuilder withPasswordRules(IPasswordRuleSet passwordRules)
 {
     _passwordRules = passwordRules;
     return(this);
 }