authentik_rust/models/
patched_password_policy_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// PatchedPasswordPolicyRequest : Password Policy Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PatchedPasswordPolicyRequest {
16    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
17    pub name: Option<String>,
18    /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.
19    #[serde(rename = "execution_logging", skip_serializing_if = "Option::is_none")]
20    pub execution_logging: Option<bool>,
21    /// Field key to check, field keys defined in Prompt stages are available.
22    #[serde(rename = "password_field", skip_serializing_if = "Option::is_none")]
23    pub password_field: Option<String>,
24    #[serde(rename = "amount_digits", skip_serializing_if = "Option::is_none")]
25    pub amount_digits: Option<i32>,
26    #[serde(rename = "amount_uppercase", skip_serializing_if = "Option::is_none")]
27    pub amount_uppercase: Option<i32>,
28    #[serde(rename = "amount_lowercase", skip_serializing_if = "Option::is_none")]
29    pub amount_lowercase: Option<i32>,
30    #[serde(rename = "amount_symbols", skip_serializing_if = "Option::is_none")]
31    pub amount_symbols: Option<i32>,
32    #[serde(rename = "length_min", skip_serializing_if = "Option::is_none")]
33    pub length_min: Option<i32>,
34    #[serde(rename = "symbol_charset", skip_serializing_if = "Option::is_none")]
35    pub symbol_charset: Option<String>,
36    #[serde(rename = "error_message", skip_serializing_if = "Option::is_none")]
37    pub error_message: Option<String>,
38    #[serde(rename = "check_static_rules", skip_serializing_if = "Option::is_none")]
39    pub check_static_rules: Option<bool>,
40    #[serde(rename = "check_have_i_been_pwned", skip_serializing_if = "Option::is_none")]
41    pub check_have_i_been_pwned: Option<bool>,
42    #[serde(rename = "check_zxcvbn", skip_serializing_if = "Option::is_none")]
43    pub check_zxcvbn: Option<bool>,
44    /// How many times the password hash is allowed to be on haveibeenpwned
45    #[serde(rename = "hibp_allowed_count", skip_serializing_if = "Option::is_none")]
46    pub hibp_allowed_count: Option<i32>,
47    /// If the zxcvbn score is equal or less than this value, the policy will fail.
48    #[serde(rename = "zxcvbn_score_threshold", skip_serializing_if = "Option::is_none")]
49    pub zxcvbn_score_threshold: Option<i32>,
50}
51
52impl PatchedPasswordPolicyRequest {
53    /// Password Policy Serializer
54    pub fn new() -> PatchedPasswordPolicyRequest {
55        PatchedPasswordPolicyRequest {
56            name: None,
57            execution_logging: None,
58            password_field: None,
59            amount_digits: None,
60            amount_uppercase: None,
61            amount_lowercase: None,
62            amount_symbols: None,
63            length_min: None,
64            symbol_charset: None,
65            error_message: None,
66            check_static_rules: None,
67            check_have_i_been_pwned: None,
68            check_zxcvbn: None,
69            hibp_allowed_count: None,
70            zxcvbn_score_threshold: None,
71        }
72    }
73}
74