1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-28 06:03:40 +00:00

Enforce Passphrase Policy (#772)

* Enforce passphrase policy

* Update multi-line conditional formatting

* Updated formatting round 2

Co-authored-by: Vincent Salucci <vsalucci@bitwarden.com>
This commit is contained in:
Vincent Salucci
2020-03-13 23:02:38 -05:00
committed by GitHub
parent a4eff45534
commit df8f44d77d
4 changed files with 87 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
{
public class PasswordGeneratorPolicyOptions
{
public string DefaultType { get; set; }
public int MinLength { get; set; }
public bool UseUppercase { get; set; }
public bool UseLowercase { get; set; }
@@ -9,5 +10,23 @@
public int NumberCount { get; set; }
public bool UseSpecial { get; set; }
public int SpecialCount { get; set; }
public int MinNumberOfWords { get; set; }
public bool Capitalize { get; set; }
public bool IncludeNumber { get; set; }
public bool InEffect()
{
return DefaultType != "" ||
MinLength > 0 ||
NumberCount > 0 ||
SpecialCount > 0 ||
UseUppercase ||
UseLowercase ||
UseNumbers ||
UseSpecial ||
MinNumberOfWords > 0 ||
Capitalize ||
IncludeNumber;
}
}
}