authentik_rust/models/
patched_o_auth2_provider_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// PatchedOAuth2ProviderRequest : OAuth2Provider Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PatchedOAuth2ProviderRequest {
16    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
17    pub name: Option<String>,
18    /// Flow used for authentication when the associated application is accessed by an un-authenticated user.
19    #[serde(rename = "authentication_flow", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub authentication_flow: Option<Option<uuid::Uuid>>,
21    /// Flow used when authorizing this provider.
22    #[serde(rename = "authorization_flow", skip_serializing_if = "Option::is_none")]
23    pub authorization_flow: Option<uuid::Uuid>,
24    #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
25    pub property_mappings: Option<Vec<uuid::Uuid>>,
26    /// Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable  * `confidential` - Confidential * `public` - Public
27    #[serde(rename = "client_type", skip_serializing_if = "Option::is_none")]
28    pub client_type: Option<models::ClientTypeEnum>,
29    #[serde(rename = "client_id", skip_serializing_if = "Option::is_none")]
30    pub client_id: Option<String>,
31    #[serde(rename = "client_secret", skip_serializing_if = "Option::is_none")]
32    pub client_secret: Option<String>,
33    /// Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
34    #[serde(rename = "access_code_validity", skip_serializing_if = "Option::is_none")]
35    pub access_code_validity: Option<String>,
36    /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
37    #[serde(rename = "access_token_validity", skip_serializing_if = "Option::is_none")]
38    pub access_token_validity: Option<String>,
39    /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
40    #[serde(rename = "refresh_token_validity", skip_serializing_if = "Option::is_none")]
41    pub refresh_token_validity: Option<String>,
42    /// Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint.
43    #[serde(rename = "include_claims_in_id_token", skip_serializing_if = "Option::is_none")]
44    pub include_claims_in_id_token: Option<bool>,
45    /// Key used to sign the tokens. Only required when JWT Algorithm is set to RS256.
46    #[serde(rename = "signing_key", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
47    pub signing_key: Option<Option<uuid::Uuid>>,
48    /// Enter each URI on a new line.
49    #[serde(rename = "redirect_uris", skip_serializing_if = "Option::is_none")]
50    pub redirect_uris: Option<String>,
51    /// Configure what data should be used as unique User Identifier. For most cases, the default should be fine.  * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains.
52    #[serde(rename = "sub_mode", skip_serializing_if = "Option::is_none")]
53    pub sub_mode: Option<models::SubModeEnum>,
54    /// Configure how the issuer field of the ID Token should be filled.  * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug.
55    #[serde(rename = "issuer_mode", skip_serializing_if = "Option::is_none")]
56    pub issuer_mode: Option<models::IssuerModeEnum>,
57    #[serde(rename = "jwks_sources", skip_serializing_if = "Option::is_none")]
58    pub jwks_sources: Option<Vec<uuid::Uuid>>,
59}
60
61impl PatchedOAuth2ProviderRequest {
62    /// OAuth2Provider Serializer
63    pub fn new() -> PatchedOAuth2ProviderRequest {
64        PatchedOAuth2ProviderRequest {
65            name: None,
66            authentication_flow: None,
67            authorization_flow: None,
68            property_mappings: None,
69            client_type: None,
70            client_id: None,
71            client_secret: None,
72            access_code_validity: None,
73            access_token_validity: None,
74            refresh_token_validity: None,
75            include_claims_in_id_token: None,
76            signing_key: None,
77            redirect_uris: None,
78            sub_mode: None,
79            issuer_mode: None,
80            jwks_sources: None,
81        }
82    }
83}
84