Interface IPasswordRuleBuilder
- Namespace
- AetherUtils.Core.Security.Passwords
- Assembly
- AetherUtils.Core.dll
Builder interface for creating a new PasswordRule.
public interface IPasswordRuleBuilder
- Extension Methods
Methods
AllowNumbers()
Allows a password to contain numbers.
IPasswordRuleBuilder AllowNumbers()
Returns
- IPasswordRuleBuilder
- The builder instance.
AllowSpecials()
Allows a password to contain special characters.
IPasswordRuleBuilder AllowSpecials()
Returns
- IPasswordRuleBuilder
- The builder instance.
AllowWhitespace()
Allows a password to contain whitespace.
IPasswordRuleBuilder AllowWhitespace()
Returns
- IPasswordRuleBuilder
- The builder instance.
Build()
Build and compile the password rule.
PasswordRule Build()
Returns
- PasswordRule
- The built PasswordRule.
Expires(DateTime)
Set the date that a password should expire at.
IPasswordRuleBuilder Expires(DateTime expires)
Parameters
expiresDateTime- The expiration expires of passwords validated against the rule.
Returns
- IPasswordRuleBuilder
- The builder instance.
MinimumLength(int)
Set the minimum length a password should be.
IPasswordRuleBuilder MinimumLength(int length)
Parameters
lengthint
Returns
- IPasswordRuleBuilder
- The builder instance.
MinimumNumberCount(int)
Set the minimum count of numbers a password should contain.
IPasswordRuleBuilder MinimumNumberCount(int count)
Parameters
countint- The minimum number of digits allowed.
Returns
- IPasswordRuleBuilder
- The builder instance.
MinimumSpecialCount(int)
Set the minimum count of special characters a password should contain.
IPasswordRuleBuilder MinimumSpecialCount(int count)
Parameters
countint- The minimum number of special characters allowed.
Returns
- IPasswordRuleBuilder
- The builder instance.