authentik_client/models/
radius_provider_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/// RadiusProviderRequest : RadiusProvider Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RadiusProviderRequest {
17    #[serde(rename = "name")]
18    pub name: String,
19    /// Flow used for authentication when the associated application is accessed by an un-authenticated user.
20    #[serde(
21        rename = "authentication_flow",
22        default,
23        with = "::serde_with::rust::double_option",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub authentication_flow: Option<Option<uuid::Uuid>>,
27    /// Flow used when authorizing this provider.
28    #[serde(rename = "authorization_flow")]
29    pub authorization_flow: uuid::Uuid,
30    /// Flow used ending the session from a provider.
31    #[serde(rename = "invalidation_flow")]
32    pub invalidation_flow: uuid::Uuid,
33    #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
34    pub property_mappings: Option<Vec<uuid::Uuid>>,
35    /// 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.
36    #[serde(rename = "client_networks", skip_serializing_if = "Option::is_none")]
37    pub client_networks: Option<String>,
38    /// Shared secret between clients and server to hash packets.
39    #[serde(rename = "shared_secret", skip_serializing_if = "Option::is_none")]
40    pub shared_secret: Option<String>,
41    /// 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.
42    #[serde(rename = "mfa_support", skip_serializing_if = "Option::is_none")]
43    pub mfa_support: Option<bool>,
44    #[serde(
45        rename = "certificate",
46        default,
47        with = "::serde_with::rust::double_option",
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub certificate: Option<Option<uuid::Uuid>>,
51}
52
53impl RadiusProviderRequest {
54    /// RadiusProvider Serializer
55    pub fn new(name: String, authorization_flow: uuid::Uuid, invalidation_flow: uuid::Uuid) -> RadiusProviderRequest {
56        RadiusProviderRequest {
57            name,
58            authentication_flow: None,
59            authorization_flow,
60            invalidation_flow,
61            property_mappings: None,
62            client_networks: None,
63            shared_secret: None,
64            mfa_support: None,
65            certificate: None,
66        }
67    }
68}