diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-04-09 09:21:49 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-09 09:21:49 +1000 |
| commit | 9d5ac4526e69f2d0fc5c027a8b53a534f44f86f2 (patch) | |
| tree | 3a5e4d9abb5eda6c9526da5970a6826708832c19 /internal/configuration/schema/password_policy.go | |
| parent | f9da940bfc1d07f25d879c495797bb02edd5785e (diff) | |
fix(configuration): remove unused password policy option (#3149)
Removes the min score option from the ZXCVBN policy and adds tests.
Diffstat (limited to 'internal/configuration/schema/password_policy.go')
| -rw-r--r-- | internal/configuration/schema/password_policy.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/internal/configuration/schema/password_policy.go b/internal/configuration/schema/password_policy.go index a87627f0f..7b247725a 100644 --- a/internal/configuration/schema/password_policy.go +++ b/internal/configuration/schema/password_policy.go @@ -11,16 +11,15 @@ type PasswordPolicyStandardParams struct { RequireSpecial bool `koanf:"require_special"` } -// PasswordPolicyZxcvbnParams represents the configuration related to zxcvbn parameters of password policy. -type PasswordPolicyZxcvbnParams struct { - Enabled bool `koanf:"enabled"` - MinScore int `koanf:"min_score"` +// PasswordPolicyZXCVBNParams represents the configuration related to ZXCVBN parameters of password policy. +type PasswordPolicyZXCVBNParams struct { + Enabled bool `koanf:"enabled"` } // PasswordPolicyConfiguration represents the configuration related to password policy. type PasswordPolicyConfiguration struct { Standard PasswordPolicyStandardParams `koanf:"standard"` - Zxcvbn PasswordPolicyZxcvbnParams `koanf:"zxcvbn"` + ZXCVBN PasswordPolicyZXCVBNParams `koanf:"zxcvbn"` } // DefaultPasswordPolicyConfiguration is the default password policy configuration. @@ -30,8 +29,7 @@ var DefaultPasswordPolicyConfiguration = PasswordPolicyConfiguration{ MinLength: 8, MaxLength: 0, }, - Zxcvbn: PasswordPolicyZxcvbnParams{ - Enabled: false, - MinScore: 0, + ZXCVBN: PasswordPolicyZXCVBNParams{ + Enabled: false, }, } |
