Skip to main content

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: 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/// 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    /// When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon.
26    #[serde(rename = "promoted", skip_serializing_if = "Option::is_none")]
27    pub promoted: Option<bool>,
28    /// Flow to use when authenticating existing users.
29    #[serde(
30        rename = "authentication_flow",
31        default,
32        with = "::serde_with::rust::double_option",
33        skip_serializing_if = "Option::is_none"
34    )]
35    pub authentication_flow: Option<Option<uuid::Uuid>>,
36    /// Flow to use when enrolling new users.
37    #[serde(
38        rename = "enrollment_flow",
39        default,
40        with = "::serde_with::rust::double_option",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub enrollment_flow: Option<Option<uuid::Uuid>>,
44    #[serde(rename = "user_property_mappings", skip_serializing_if = "Option::is_none")]
45    pub user_property_mappings: Option<Vec<uuid::Uuid>>,
46    #[serde(rename = "group_property_mappings", skip_serializing_if = "Option::is_none")]
47    pub group_property_mappings: Option<Vec<uuid::Uuid>>,
48    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
49    pub policy_engine_mode: Option<models::PolicyEngineMode>,
50    /// How the source determines if an existing user should be authenticated or a new user enrolled.
51    #[serde(rename = "user_matching_mode", skip_serializing_if = "Option::is_none")]
52    pub user_matching_mode: Option<models::UserMatchingModeEnum>,
53    #[serde(rename = "user_path_template", skip_serializing_if = "Option::is_none")]
54    pub user_path_template: Option<String>,
55    #[serde(rename = "icon", skip_serializing_if = "Option::is_none")]
56    pub icon: Option<String>,
57    /// How the source determines if an existing group should be used or a new group created.
58    #[serde(rename = "group_matching_mode", skip_serializing_if = "Option::is_none")]
59    pub group_matching_mode: Option<models::GroupMatchingModeEnum>,
60    #[serde(rename = "provider_type", skip_serializing_if = "Option::is_none")]
61    pub provider_type: Option<models::ProviderTypeEnum>,
62    /// URL used to request the initial token. This URL is only required for OAuth 1.
63    #[serde(
64        rename = "request_token_url",
65        default,
66        with = "::serde_with::rust::double_option",
67        skip_serializing_if = "Option::is_none"
68    )]
69    pub request_token_url: Option<Option<String>>,
70    /// URL the user is redirect to to conest the flow.
71    #[serde(
72        rename = "authorization_url",
73        default,
74        with = "::serde_with::rust::double_option",
75        skip_serializing_if = "Option::is_none"
76    )]
77    pub authorization_url: Option<Option<String>>,
78    /// URL used by authentik to retrieve tokens.
79    #[serde(
80        rename = "access_token_url",
81        default,
82        with = "::serde_with::rust::double_option",
83        skip_serializing_if = "Option::is_none"
84    )]
85    pub access_token_url: Option<Option<String>>,
86    /// URL used by authentik to get user information.
87    #[serde(
88        rename = "profile_url",
89        default,
90        with = "::serde_with::rust::double_option",
91        skip_serializing_if = "Option::is_none"
92    )]
93    pub profile_url: Option<Option<String>>,
94    #[serde(rename = "pkce", skip_serializing_if = "Option::is_none")]
95    pub pkce: Option<models::PkceMethodEnum>,
96    #[serde(rename = "consumer_key", skip_serializing_if = "Option::is_none")]
97    pub consumer_key: Option<String>,
98    #[serde(rename = "consumer_secret", skip_serializing_if = "Option::is_none")]
99    pub consumer_secret: Option<String>,
100    #[serde(rename = "additional_scopes", skip_serializing_if = "Option::is_none")]
101    pub additional_scopes: Option<String>,
102    #[serde(rename = "oidc_well_known_url", skip_serializing_if = "Option::is_none")]
103    pub oidc_well_known_url: Option<String>,
104    #[serde(rename = "oidc_jwks_url", skip_serializing_if = "Option::is_none")]
105    pub oidc_jwks_url: Option<String>,
106    #[serde(rename = "oidc_jwks", skip_serializing_if = "Option::is_none")]
107    pub oidc_jwks: Option<std::collections::HashMap<String, serde_json::Value>>,
108    /// How to perform authentication during an authorization_code token request flow
109    #[serde(rename = "authorization_code_auth_method", skip_serializing_if = "Option::is_none")]
110    pub authorization_code_auth_method: Option<models::AuthorizationCodeAuthMethodEnum>,
111}
112
113impl PatchedOAuthSourceRequest {
114    /// OAuth Source Serializer
115    pub fn new() -> PatchedOAuthSourceRequest {
116        PatchedOAuthSourceRequest {
117            name: None,
118            slug: None,
119            enabled: None,
120            promoted: None,
121            authentication_flow: None,
122            enrollment_flow: None,
123            user_property_mappings: None,
124            group_property_mappings: None,
125            policy_engine_mode: None,
126            user_matching_mode: None,
127            user_path_template: None,
128            icon: None,
129            group_matching_mode: None,
130            provider_type: None,
131            request_token_url: None,
132            authorization_url: None,
133            access_token_url: None,
134            profile_url: None,
135            pkce: None,
136            consumer_key: None,
137            consumer_secret: None,
138            additional_scopes: None,
139            oidc_well_known_url: None,
140            oidc_jwks_url: None,
141            oidc_jwks: None,
142            authorization_code_auth_method: None,
143        }
144    }
145}