Skip to main content

authentik_client/models/
patched_password_policy_request.rs

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