authentik_rust/models/
radius_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/// RadiusOutpostConfig : RadiusProvider Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RadiusOutpostConfig {
16    #[serde(rename = "pk")]
17    pub pk: i32,
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(rename = "application_slug")]
21    pub application_slug: String,
22    #[serde(rename = "auth_flow_slug")]
23    pub auth_flow_slug: String,
24    /// List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped.
25    #[serde(rename = "client_networks", skip_serializing_if = "Option::is_none")]
26    pub client_networks: Option<String>,
27    /// Shared secret between clients and server to hash packets.
28    #[serde(rename = "shared_secret", skip_serializing_if = "Option::is_none")]
29    pub shared_secret: Option<String>,
30    /// 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.
31    #[serde(rename = "mfa_support", skip_serializing_if = "Option::is_none")]
32    pub mfa_support: Option<bool>,
33}
34
35impl RadiusOutpostConfig {
36    /// RadiusProvider Serializer
37    pub fn new(pk: i32, name: String, application_slug: String, auth_flow_slug: String) -> RadiusOutpostConfig {
38        RadiusOutpostConfig {
39            pk,
40            name,
41            application_slug,
42            auth_flow_slug,
43            client_networks: None,
44            shared_secret: None,
45            mfa_support: None,
46        }
47    }
48}
49