authentik_rust/models/
ldap_outpost_config.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/// LdapOutpostConfig : LDAPProvider Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct LdapOutpostConfig {
16    #[serde(rename = "pk")]
17    pub pk: i32,
18    #[serde(rename = "name")]
19    pub name: String,
20    /// DN under which objects are accessible.
21    #[serde(rename = "base_dn", skip_serializing_if = "Option::is_none")]
22    pub base_dn: Option<String>,
23    #[serde(rename = "bind_flow_slug")]
24    pub bind_flow_slug: String,
25    /// Prioritise backchannel slug over direct application slug
26    #[serde(rename = "application_slug")]
27    pub application_slug: String,
28    /// Users in this group can do search queries. If not set, every user can execute search queries.
29    #[serde(rename = "search_group", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub search_group: Option<Option<uuid::Uuid>>,
31    #[serde(rename = "certificate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
32    pub certificate: Option<Option<uuid::Uuid>>,
33    #[serde(rename = "tls_server_name", skip_serializing_if = "Option::is_none")]
34    pub tls_server_name: Option<String>,
35    /// The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber
36    #[serde(rename = "uid_start_number", skip_serializing_if = "Option::is_none")]
37    pub uid_start_number: Option<i32>,
38    /// The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber
39    #[serde(rename = "gid_start_number", skip_serializing_if = "Option::is_none")]
40    pub gid_start_number: Option<i32>,
41    #[serde(rename = "search_mode", skip_serializing_if = "Option::is_none")]
42    pub search_mode: Option<models::LdapapiAccessMode>,
43    #[serde(rename = "bind_mode", skip_serializing_if = "Option::is_none")]
44    pub bind_mode: Option<models::LdapapiAccessMode>,
45    /// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon.
46    #[serde(rename = "mfa_support", skip_serializing_if = "Option::is_none")]
47    pub mfa_support: Option<bool>,
48}
49
50impl LdapOutpostConfig {
51    /// LDAPProvider Serializer
52    pub fn new(pk: i32, name: String, bind_flow_slug: String, application_slug: String) -> LdapOutpostConfig {
53        LdapOutpostConfig {
54            pk,
55            name,
56            base_dn: None,
57            bind_flow_slug,
58            application_slug,
59            search_group: None,
60            certificate: None,
61            tls_server_name: None,
62            uid_start_number: None,
63            gid_start_number: None,
64            search_mode: None,
65            bind_mode: None,
66            mfa_support: None,
67        }
68    }
69}
70