authentik_client/models/
patched_o_auth_source_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.8.4
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// PatchedOAuthSourceRequest : OAuth Source Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PatchedOAuthSourceRequest {
17    /// Source's display Name.
18    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
19    pub name: Option<String>,
20    /// Internal source name, used in URLs.
21    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
22    pub slug: Option<String>,
23    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
24    pub enabled: Option<bool>,
25    /// Flow to use when authenticating existing users.
26    #[serde(
27        rename = "authentication_flow",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub authentication_flow: Option<Option<uuid::Uuid>>,
33    /// Flow to use when enrolling new users.
34    #[serde(
35        rename = "enrollment_flow",
36        default,
37        with = "::serde_with::rust::double_option",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub enrollment_flow: Option<Option<uuid::Uuid>>,
41    #[serde(rename = "user_property_mappings", skip_serializing_if = "Option::is_none")]
42    pub user_property_mappings: Option<Vec<uuid::Uuid>>,
43    #[serde(rename = "group_property_mappings", skip_serializing_if = "Option::is_none")]
44    pub group_property_mappings: Option<Vec<uuid::Uuid>>,
45    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
46    pub policy_engine_mode: Option<models::PolicyEngineMode>,
47    /// How the source determines if an existing user should be authenticated or a new user enrolled.
48    #[serde(rename = "user_matching_mode", skip_serializing_if = "Option::is_none")]
49    pub user_matching_mode: Option<models::UserMatchingModeEnum>,
50    #[serde(rename = "user_path_template", skip_serializing_if = "Option::is_none")]
51    pub user_path_template: Option<String>,
52    /// How the source determines if an existing group should be used or a new group created.
53    #[serde(rename = "group_matching_mode", skip_serializing_if = "Option::is_none")]
54    pub group_matching_mode: Option<models::GroupMatchingModeEnum>,
55    #[serde(rename = "provider_type", skip_serializing_if = "Option::is_none")]
56    pub provider_type: Option<models::ProviderTypeEnum>,
57    /// URL used to request the initial token. This URL is only required for OAuth 1.
58    #[serde(
59        rename = "request_token_url",
60        default,
61        with = "::serde_with::rust::double_option",
62        skip_serializing_if = "Option::is_none"
63    )]
64    pub request_token_url: Option<Option<String>>,
65    /// URL the user is redirect to to conest the flow.
66    #[serde(
67        rename = "authorization_url",
68        default,
69        with = "::serde_with::rust::double_option",
70        skip_serializing_if = "Option::is_none"
71    )]
72    pub authorization_url: Option<Option<String>>,
73    /// URL used by authentik to retrieve tokens.
74    #[serde(
75        rename = "access_token_url",
76        default,
77        with = "::serde_with::rust::double_option",
78        skip_serializing_if = "Option::is_none"
79    )]
80    pub access_token_url: Option<Option<String>>,
81    /// URL used by authentik to get user information.
82    #[serde(
83        rename = "profile_url",
84        default,
85        with = "::serde_with::rust::double_option",
86        skip_serializing_if = "Option::is_none"
87    )]
88    pub profile_url: Option<Option<String>>,
89    #[serde(rename = "consumer_key", skip_serializing_if = "Option::is_none")]
90    pub consumer_key: Option<String>,
91    #[serde(rename = "consumer_secret", skip_serializing_if = "Option::is_none")]
92    pub consumer_secret: Option<String>,
93    #[serde(rename = "additional_scopes", skip_serializing_if = "Option::is_none")]
94    pub additional_scopes: Option<String>,
95    #[serde(rename = "oidc_well_known_url", skip_serializing_if = "Option::is_none")]
96    pub oidc_well_known_url: Option<String>,
97    #[serde(rename = "oidc_jwks_url", skip_serializing_if = "Option::is_none")]
98    pub oidc_jwks_url: Option<String>,
99    #[serde(rename = "oidc_jwks", skip_serializing_if = "Option::is_none")]
100    pub oidc_jwks: Option<std::collections::HashMap<String, serde_json::Value>>,
101    /// How to perform authentication during an authorization_code token request flow
102    #[serde(rename = "authorization_code_auth_method", skip_serializing_if = "Option::is_none")]
103    pub authorization_code_auth_method: Option<models::AuthorizationCodeAuthMethodEnum>,
104}
105
106impl PatchedOAuthSourceRequest {
107    /// OAuth Source Serializer
108    pub fn new() -> PatchedOAuthSourceRequest {
109        PatchedOAuthSourceRequest {
110            name: None,
111            slug: None,
112            enabled: None,
113            authentication_flow: None,
114            enrollment_flow: None,
115            user_property_mappings: None,
116            group_property_mappings: None,
117            policy_engine_mode: None,
118            user_matching_mode: None,
119            user_path_template: None,
120            group_matching_mode: None,
121            provider_type: None,
122            request_token_url: None,
123            authorization_url: None,
124            access_token_url: None,
125            profile_url: None,
126            consumer_key: None,
127            consumer_secret: None,
128            additional_scopes: None,
129            oidc_well_known_url: None,
130            oidc_jwks_url: None,
131            oidc_jwks: None,
132            authorization_code_auth_method: None,
133        }
134    }
135}