Skip to main content

authentik_client/models/
proxy_provider_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.10.4
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ProxyProviderRequest : ProxyProvider Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProxyProviderRequest {
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    #[serde(rename = "internal_host", skip_serializing_if = "Option::is_none")]
36    pub internal_host: Option<String>,
37    #[serde(rename = "external_host")]
38    pub external_host: String,
39    /// Validate SSL Certificates of upstream servers
40    #[serde(rename = "internal_host_ssl_validation", skip_serializing_if = "Option::is_none")]
41    pub internal_host_ssl_validation: Option<bool>,
42    #[serde(
43        rename = "certificate",
44        default,
45        with = "::serde_with::rust::double_option",
46        skip_serializing_if = "Option::is_none"
47    )]
48    pub certificate: Option<Option<uuid::Uuid>>,
49    /// Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression.
50    #[serde(rename = "skip_path_regex", skip_serializing_if = "Option::is_none")]
51    pub skip_path_regex: Option<String>,
52    /// Set a custom HTTP-Basic Authentication header based on values from authentik.
53    #[serde(rename = "basic_auth_enabled", skip_serializing_if = "Option::is_none")]
54    pub basic_auth_enabled: Option<bool>,
55    /// User/Group Attribute used for the password part of the HTTP-Basic Header.
56    #[serde(rename = "basic_auth_password_attribute", skip_serializing_if = "Option::is_none")]
57    pub basic_auth_password_attribute: Option<String>,
58    /// User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used.
59    #[serde(rename = "basic_auth_user_attribute", skip_serializing_if = "Option::is_none")]
60    pub basic_auth_user_attribute: Option<String>,
61    /// Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host.
62    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
63    pub mode: Option<models::ProxyMode>,
64    /// When enabled, this provider will intercept the authorization header and authenticate requests based on its value.
65    #[serde(rename = "intercept_header_auth", skip_serializing_if = "Option::is_none")]
66    pub intercept_header_auth: Option<bool>,
67    #[serde(rename = "cookie_domain", skip_serializing_if = "Option::is_none")]
68    pub cookie_domain: Option<String>,
69    #[serde(rename = "jwt_federation_sources", skip_serializing_if = "Option::is_none")]
70    pub jwt_federation_sources: Option<Vec<uuid::Uuid>>,
71    #[serde(rename = "jwt_federation_providers", skip_serializing_if = "Option::is_none")]
72    pub jwt_federation_providers: Option<Vec<i32>>,
73    /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
74    #[serde(rename = "access_token_validity", skip_serializing_if = "Option::is_none")]
75    pub access_token_validity: Option<String>,
76    /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
77    #[serde(rename = "refresh_token_validity", skip_serializing_if = "Option::is_none")]
78    pub refresh_token_validity: Option<String>,
79}
80
81impl ProxyProviderRequest {
82    /// ProxyProvider Serializer
83    pub fn new(
84        name: String,
85        authorization_flow: uuid::Uuid,
86        invalidation_flow: uuid::Uuid,
87        external_host: String,
88    ) -> ProxyProviderRequest {
89        ProxyProviderRequest {
90            name,
91            authentication_flow: None,
92            authorization_flow,
93            invalidation_flow,
94            property_mappings: None,
95            internal_host: None,
96            external_host,
97            internal_host_ssl_validation: None,
98            certificate: None,
99            skip_path_regex: None,
100            basic_auth_enabled: None,
101            basic_auth_password_attribute: None,
102            basic_auth_user_attribute: None,
103            mode: None,
104            intercept_header_auth: None,
105            cookie_domain: None,
106            jwt_federation_sources: None,
107            jwt_federation_providers: None,
108            access_token_validity: None,
109            refresh_token_validity: None,
110        }
111    }
112}