Exemple #1
0
        private List <string> GetPasswordRuleNames()
        {
            var ruleNamesList = new List <string>();

            if (_complexityRules.HasFlag(PasswordComplexityRules.CapitalLetters))
            {
                ruleNamesList.Add("capital letter");
            }

            if (_complexityRules.HasFlag(PasswordComplexityRules.Numbers))
            {
                ruleNamesList.Add("number");
            }

            if (_complexityRules.HasFlag(PasswordComplexityRules.Punctuation))
            {
                ruleNamesList.Add("punctuation");
            }

            if (_complexityRules.HasFlag(PasswordComplexityRules.SpecialCharacters))
            {
                ruleNamesList.Add("special character");
            }

            return(ruleNamesList);
        }