Skip to main content

authentik_client/models/
ldap_outpost_config.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/// LdapOutpostConfig : LDAPProvider Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct LdapOutpostConfig {
17    #[serde(rename = "pk")]
18    pub pk: i32,
19    #[serde(rename = "name")]
20    pub name: String,
21    /// DN under which objects are accessible.
22    #[serde(rename = "base_dn", skip_serializing_if = "Option::is_none")]
23    pub base_dn: Option<String>,
24    #[serde(rename = "bind_flow_slug")]
25    pub bind_flow_slug: String,
26    /// Get slug for unbind flow, defaulting to brand's default flow.
27    #[serde(rename = "unbind_flow_slug", deserialize_with = "Option::deserialize")]
28    pub unbind_flow_slug: Option<String>,
29    /// Prioritise backchannel slug over direct application slug
30    #[serde(rename = "application_slug")]
31    pub application_slug: String,
32    #[serde(
33        rename = "certificate",
34        default,
35        with = "::serde_with::rust::double_option",
36        skip_serializing_if = "Option::is_none"
37    )]
38    pub certificate: Option<Option<uuid::Uuid>>,
39    #[serde(rename = "tls_server_name", skip_serializing_if = "Option::is_none")]
40    pub tls_server_name: Option<String>,
41    /// 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
42    #[serde(rename = "uid_start_number", skip_serializing_if = "Option::is_none")]
43    pub uid_start_number: Option<i32>,
44    /// 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
45    #[serde(rename = "gid_start_number", skip_serializing_if = "Option::is_none")]
46    pub gid_start_number: Option<i32>,
47    #[serde(rename = "search_mode", skip_serializing_if = "Option::is_none")]
48    pub search_mode: Option<models::LdapapiAccessMode>,
49    #[serde(rename = "bind_mode", skip_serializing_if = "Option::is_none")]
50    pub bind_mode: Option<models::LdapapiAccessMode>,
51    /// 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.
52    #[serde(rename = "mfa_support", skip_serializing_if = "Option::is_none")]
53    pub mfa_support: Option<bool>,
54}
55
56impl LdapOutpostConfig {
57    /// LDAPProvider Serializer
58    pub fn new(
59        pk: i32,
60        name: String,
61        bind_flow_slug: String,
62        unbind_flow_slug: Option<String>,
63        application_slug: String,
64    ) -> LdapOutpostConfig {
65        LdapOutpostConfig {
66            pk,
67            name,
68            base_dn: None,
69            bind_flow_slug,
70            unbind_flow_slug,
71            application_slug,
72            certificate: None,
73            tls_server_name: None,
74            uid_start_number: None,
75            gid_start_number: None,
76            search_mode: None,
77            bind_mode: None,
78            mfa_support: None,
79        }
80    }
81}