Class PasswordPolicy
Password policy for User Pools.
public class PasswordPolicy : IPasswordPolicy
- Inheritance
-
PasswordPolicy
- Implements
- Inherited Members
Examples
new UserPool(this, "myuserpool", new UserPoolProps {
// ...
PasswordPolicy = new PasswordPolicy {
MinLength = 12,
RequireLowercase = true,
RequireUppercase = true,
RequireDigits = true,
RequireSymbols = true,
TempPasswordValidity = Duration.Days(3)
}
});
Remarks
ExampleMetadata: infused
Constructors
PasswordPolicy()
public PasswordPolicy()
Properties
MinLength
Minimum length required for a user's password.
public double? MinLength { get; set; }
Property Value
Remarks
Default: 8
RequireDigits
Whether the user is required to have digits in their password.
public bool? RequireDigits { get; set; }
Property Value
- bool?
Remarks
Default: true
RequireLowercase
Whether the user is required to have lowercase characters in their password.
public bool? RequireLowercase { get; set; }
Property Value
- bool?
Remarks
Default: true
RequireSymbols
Whether the user is required to have symbols in their password.
public bool? RequireSymbols { get; set; }
Property Value
- bool?
Remarks
Default: true
RequireUppercase
Whether the user is required to have uppercase characters in their password.
public bool? RequireUppercase { get; set; }
Property Value
- bool?
Remarks
Default: true
TempPasswordValidity
The length of time the temporary password generated by an admin is valid.
public Duration? TempPasswordValidity { get; set; }
Property Value
- Duration
Remarks
This must be provided as whole days, like Duration.days(3) or Duration.hours(48). Fractional days, such as Duration.hours(20), will generate an error.
Default: Duration.days(7)