Skip to main content

authentik_client/models/
proxy_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/// ProxyOutpostConfig : Proxy provider serializer for outposts
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProxyOutpostConfig {
17    #[serde(rename = "pk")]
18    pub pk: i32,
19    #[serde(rename = "name")]
20    pub name: String,
21    #[serde(rename = "internal_host", skip_serializing_if = "Option::is_none")]
22    pub internal_host: Option<String>,
23    #[serde(rename = "external_host")]
24    pub external_host: String,
25    /// Validate SSL Certificates of upstream servers
26    #[serde(rename = "internal_host_ssl_validation", skip_serializing_if = "Option::is_none")]
27    pub internal_host_ssl_validation: Option<bool>,
28    #[serde(rename = "client_id", skip_serializing_if = "Option::is_none")]
29    pub client_id: Option<String>,
30    #[serde(rename = "client_secret", skip_serializing_if = "Option::is_none")]
31    pub client_secret: Option<String>,
32    #[serde(rename = "oidc_configuration")]
33    pub oidc_configuration: models::OpenIdConnectConfiguration,
34    #[serde(rename = "cookie_secret", skip_serializing_if = "Option::is_none")]
35    pub cookie_secret: Option<String>,
36    #[serde(
37        rename = "certificate",
38        default,
39        with = "::serde_with::rust::double_option",
40        skip_serializing_if = "Option::is_none"
41    )]
42    pub certificate: Option<Option<uuid::Uuid>>,
43    /// Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression.
44    #[serde(rename = "skip_path_regex", skip_serializing_if = "Option::is_none")]
45    pub skip_path_regex: Option<String>,
46    /// Set a custom HTTP-Basic Authentication header based on values from authentik.
47    #[serde(rename = "basic_auth_enabled", skip_serializing_if = "Option::is_none")]
48    pub basic_auth_enabled: Option<bool>,
49    /// User/Group Attribute used for the password part of the HTTP-Basic Header.
50    #[serde(rename = "basic_auth_password_attribute", skip_serializing_if = "Option::is_none")]
51    pub basic_auth_password_attribute: Option<String>,
52    /// User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used.
53    #[serde(rename = "basic_auth_user_attribute", skip_serializing_if = "Option::is_none")]
54    pub basic_auth_user_attribute: Option<String>,
55    /// Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host.
56    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
57    pub mode: Option<models::ProxyMode>,
58    #[serde(rename = "cookie_domain", skip_serializing_if = "Option::is_none")]
59    pub cookie_domain: Option<String>,
60    /// Get token validity as second count
61    #[serde(rename = "access_token_validity", deserialize_with = "Option::deserialize")]
62    pub access_token_validity: Option<f64>,
63    /// When enabled, this provider will intercept the authorization header and authenticate requests based on its value.
64    #[serde(rename = "intercept_header_auth", skip_serializing_if = "Option::is_none")]
65    pub intercept_header_auth: Option<bool>,
66    /// Get all the scope names the outpost should request, including custom-defined ones
67    #[serde(rename = "scopes_to_request")]
68    pub scopes_to_request: Vec<String>,
69    /// Internal application name, used in URLs.
70    #[serde(rename = "assigned_application_slug")]
71    pub assigned_application_slug: String,
72    /// Application's display Name.
73    #[serde(rename = "assigned_application_name")]
74    pub assigned_application_name: String,
75}
76
77impl ProxyOutpostConfig {
78    /// Proxy provider serializer for outposts
79    pub fn new(
80        pk: i32,
81        name: String,
82        external_host: String,
83        oidc_configuration: models::OpenIdConnectConfiguration,
84        access_token_validity: Option<f64>,
85        scopes_to_request: Vec<String>,
86        assigned_application_slug: String,
87        assigned_application_name: String,
88    ) -> ProxyOutpostConfig {
89        ProxyOutpostConfig {
90            pk,
91            name,
92            internal_host: None,
93            external_host,
94            internal_host_ssl_validation: None,
95            client_id: None,
96            client_secret: None,
97            oidc_configuration,
98            cookie_secret: None,
99            certificate: None,
100            skip_path_regex: None,
101            basic_auth_enabled: None,
102            basic_auth_password_attribute: None,
103            basic_auth_user_attribute: None,
104            mode: None,
105            cookie_domain: None,
106            access_token_validity,
107            intercept_header_auth: None,
108            scopes_to_request,
109            assigned_application_slug,
110            assigned_application_name,
111        }
112    }
113}