authentik_rust/models/
patched_saml_source_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/// PatchedSamlSourceRequest : SAMLSource Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PatchedSamlSourceRequest {
16    /// Source's display Name.
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    /// Internal source name, used in URLs.
20    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
21    pub slug: Option<String>,
22    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
23    pub enabled: Option<bool>,
24    /// Flow to use when authenticating existing users.
25    #[serde(rename = "authentication_flow", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub authentication_flow: Option<Option<uuid::Uuid>>,
27    /// Flow to use when enrolling new users.
28    #[serde(rename = "enrollment_flow", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub enrollment_flow: Option<Option<uuid::Uuid>>,
30    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
31    pub policy_engine_mode: Option<models::PolicyEngineMode>,
32    /// How the source determines if an existing user should be authenticated or a new user enrolled.  * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists.
33    #[serde(rename = "user_matching_mode", skip_serializing_if = "Option::is_none")]
34    pub user_matching_mode: Option<models::UserMatchingModeEnum>,
35    #[serde(rename = "user_path_template", skip_serializing_if = "Option::is_none")]
36    pub user_path_template: Option<String>,
37    /// Flow used before authentication.
38    #[serde(rename = "pre_authentication_flow", skip_serializing_if = "Option::is_none")]
39    pub pre_authentication_flow: Option<uuid::Uuid>,
40    /// Also known as Entity ID. Defaults the Metadata URL.
41    #[serde(rename = "issuer", skip_serializing_if = "Option::is_none")]
42    pub issuer: Option<String>,
43    /// URL that the initial Login request is sent to.
44    #[serde(rename = "sso_url", skip_serializing_if = "Option::is_none")]
45    pub sso_url: Option<String>,
46    /// Optional URL if your IDP supports Single-Logout.
47    #[serde(rename = "slo_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
48    pub slo_url: Option<Option<String>>,
49    /// Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done.
50    #[serde(rename = "allow_idp_initiated", skip_serializing_if = "Option::is_none")]
51    pub allow_idp_initiated: Option<bool>,
52    /// NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent.  * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient
53    #[serde(rename = "name_id_policy", skip_serializing_if = "Option::is_none")]
54    pub name_id_policy: Option<models::NameIdPolicyEnum>,
55    #[serde(rename = "binding_type", skip_serializing_if = "Option::is_none")]
56    pub binding_type: Option<models::BindingTypeEnum>,
57    /// When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default.
58    #[serde(rename = "verification_kp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
59    pub verification_kp: Option<Option<uuid::Uuid>>,
60    /// Keypair used to sign outgoing Responses going to the Identity Provider.
61    #[serde(rename = "signing_kp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
62    pub signing_kp: Option<Option<uuid::Uuid>>,
63    #[serde(rename = "digest_algorithm", skip_serializing_if = "Option::is_none")]
64    pub digest_algorithm: Option<models::DigestAlgorithmEnum>,
65    #[serde(rename = "signature_algorithm", skip_serializing_if = "Option::is_none")]
66    pub signature_algorithm: Option<models::SignatureAlgorithmEnum>,
67    /// Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3).
68    #[serde(rename = "temporary_user_delete_after", skip_serializing_if = "Option::is_none")]
69    pub temporary_user_delete_after: Option<String>,
70}
71
72impl PatchedSamlSourceRequest {
73    /// SAMLSource Serializer
74    pub fn new() -> PatchedSamlSourceRequest {
75        PatchedSamlSourceRequest {
76            name: None,
77            slug: None,
78            enabled: None,
79            authentication_flow: None,
80            enrollment_flow: None,
81            policy_engine_mode: None,
82            user_matching_mode: None,
83            user_path_template: None,
84            pre_authentication_flow: None,
85            issuer: None,
86            sso_url: None,
87            slo_url: None,
88            allow_idp_initiated: None,
89            name_id_policy: None,
90            binding_type: None,
91            verification_kp: None,
92            signing_kp: None,
93            digest_algorithm: None,
94            signature_algorithm: None,
95            temporary_user_delete_after: None,
96        }
97    }
98}
99