Skip to main content

authentik_client/models/
radius_provider.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.8.6
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// RadiusProvider : RadiusProvider Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RadiusProvider {
17    #[serde(rename = "pk")]
18    pub pk: i32,
19    #[serde(rename = "name")]
20    pub name: String,
21    /// Flow used for authentication when the associated application is accessed by an un-authenticated user.
22    #[serde(
23        rename = "authentication_flow",
24        default,
25        with = "::serde_with::rust::double_option",
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub authentication_flow: Option<Option<uuid::Uuid>>,
29    /// Flow used when authorizing this provider.
30    #[serde(rename = "authorization_flow")]
31    pub authorization_flow: uuid::Uuid,
32    /// Flow used ending the session from a provider.
33    #[serde(rename = "invalidation_flow")]
34    pub invalidation_flow: uuid::Uuid,
35    #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
36    pub property_mappings: Option<Vec<uuid::Uuid>>,
37    /// Get object component so that we know how to edit the object
38    #[serde(rename = "component")]
39    pub component: String,
40    /// Internal application name, used in URLs.
41    #[serde(rename = "assigned_application_slug", deserialize_with = "Option::deserialize")]
42    pub assigned_application_slug: Option<String>,
43    /// Application's display Name.
44    #[serde(rename = "assigned_application_name", deserialize_with = "Option::deserialize")]
45    pub assigned_application_name: Option<String>,
46    /// Internal application name, used in URLs.
47    #[serde(
48        rename = "assigned_backchannel_application_slug",
49        deserialize_with = "Option::deserialize"
50    )]
51    pub assigned_backchannel_application_slug: Option<String>,
52    /// Application's display Name.
53    #[serde(
54        rename = "assigned_backchannel_application_name",
55        deserialize_with = "Option::deserialize"
56    )]
57    pub assigned_backchannel_application_name: Option<String>,
58    /// Return object's verbose_name
59    #[serde(rename = "verbose_name")]
60    pub verbose_name: String,
61    /// Return object's plural verbose_name
62    #[serde(rename = "verbose_name_plural")]
63    pub verbose_name_plural: String,
64    /// Return internal model name
65    #[serde(rename = "meta_model_name")]
66    pub meta_model_name: String,
67    /// 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.
68    #[serde(rename = "client_networks", skip_serializing_if = "Option::is_none")]
69    pub client_networks: Option<String>,
70    /// Shared secret between clients and server to hash packets.
71    #[serde(rename = "shared_secret", skip_serializing_if = "Option::is_none")]
72    pub shared_secret: Option<String>,
73    #[serde(rename = "outpost_set")]
74    pub outpost_set: Vec<String>,
75    /// 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.
76    #[serde(rename = "mfa_support", skip_serializing_if = "Option::is_none")]
77    pub mfa_support: Option<bool>,
78}
79
80impl RadiusProvider {
81    /// RadiusProvider Serializer
82    pub fn new(
83        pk: i32,
84        name: String,
85        authorization_flow: uuid::Uuid,
86        invalidation_flow: uuid::Uuid,
87        component: String,
88        assigned_application_slug: Option<String>,
89        assigned_application_name: Option<String>,
90        assigned_backchannel_application_slug: Option<String>,
91        assigned_backchannel_application_name: Option<String>,
92        verbose_name: String,
93        verbose_name_plural: String,
94        meta_model_name: String,
95        outpost_set: Vec<String>,
96    ) -> RadiusProvider {
97        RadiusProvider {
98            pk,
99            name,
100            authentication_flow: None,
101            authorization_flow,
102            invalidation_flow,
103            property_mappings: None,
104            component,
105            assigned_application_slug,
106            assigned_application_name,
107            assigned_backchannel_application_slug,
108            assigned_backchannel_application_name,
109            verbose_name,
110            verbose_name_plural,
111            meta_model_name,
112            client_networks: None,
113            shared_secret: None,
114            outpost_set,
115            mfa_support: None,
116        }
117    }
118}