authentik_client/models/
unique_password_policy_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.10.2
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// UniquePasswordPolicyRequest : Password Uniqueness Policy Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UniquePasswordPolicyRequest {
17    #[serde(rename = "name")]
18    pub name: 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    /// Number of passwords to check against.
26    #[serde(rename = "num_historical_passwords", skip_serializing_if = "Option::is_none")]
27    pub num_historical_passwords: Option<u32>,
28}
29
30impl UniquePasswordPolicyRequest {
31    /// Password Uniqueness Policy Serializer
32    pub fn new(name: String) -> UniquePasswordPolicyRequest {
33        UniquePasswordPolicyRequest {
34            name,
35            execution_logging: None,
36            password_field: None,
37            num_historical_passwords: None,
38        }
39    }
40}