Skip to main content

authentik_client/models/
ws_federation_provider_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/// WsFederationProviderRequest : WSFederationProvider Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WsFederationProviderRequest {
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 = "reply_url")]
36    pub reply_url: String,
37    #[serde(rename = "wtrealm")]
38    pub wtrealm: String,
39    /// Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3).
40    #[serde(rename = "assertion_valid_not_before", skip_serializing_if = "Option::is_none")]
41    pub assertion_valid_not_before: Option<String>,
42    /// Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
43    #[serde(rename = "assertion_valid_not_on_or_after", skip_serializing_if = "Option::is_none")]
44    pub assertion_valid_not_on_or_after: Option<String>,
45    /// Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
46    #[serde(rename = "session_valid_not_on_or_after", skip_serializing_if = "Option::is_none")]
47    pub session_valid_not_on_or_after: Option<String>,
48    /// Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered
49    #[serde(
50        rename = "name_id_mapping",
51        default,
52        with = "::serde_with::rust::double_option",
53        skip_serializing_if = "Option::is_none"
54    )]
55    pub name_id_mapping: Option<Option<uuid::Uuid>>,
56    /// Configure how the AuthnContextClassRef value will be created. When left empty, the AuthnContextClassRef will be set based on which authentication methods the user used to authenticate.
57    #[serde(
58        rename = "authn_context_class_ref_mapping",
59        default,
60        with = "::serde_with::rust::double_option",
61        skip_serializing_if = "Option::is_none"
62    )]
63    pub authn_context_class_ref_mapping: Option<Option<uuid::Uuid>>,
64    #[serde(rename = "digest_algorithm", skip_serializing_if = "Option::is_none")]
65    pub digest_algorithm: Option<models::DigestAlgorithmEnum>,
66    #[serde(rename = "signature_algorithm", skip_serializing_if = "Option::is_none")]
67    pub signature_algorithm: Option<models::SignatureAlgorithmEnum>,
68    /// Keypair used to sign outgoing Responses going to the Service Provider.
69    #[serde(
70        rename = "signing_kp",
71        default,
72        with = "::serde_with::rust::double_option",
73        skip_serializing_if = "Option::is_none"
74    )]
75    pub signing_kp: Option<Option<uuid::Uuid>>,
76    /// When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key.
77    #[serde(
78        rename = "encryption_kp",
79        default,
80        with = "::serde_with::rust::double_option",
81        skip_serializing_if = "Option::is_none"
82    )]
83    pub encryption_kp: Option<Option<uuid::Uuid>>,
84    #[serde(rename = "sign_assertion", skip_serializing_if = "Option::is_none")]
85    pub sign_assertion: Option<bool>,
86    #[serde(rename = "sign_logout_request", skip_serializing_if = "Option::is_none")]
87    pub sign_logout_request: Option<bool>,
88    #[serde(rename = "default_name_id_policy", skip_serializing_if = "Option::is_none")]
89    pub default_name_id_policy: Option<models::SamlNameIdPolicyEnum>,
90}
91
92impl WsFederationProviderRequest {
93    /// WSFederationProvider Serializer
94    pub fn new(
95        name: String,
96        authorization_flow: uuid::Uuid,
97        invalidation_flow: uuid::Uuid,
98        reply_url: String,
99        wtrealm: String,
100    ) -> WsFederationProviderRequest {
101        WsFederationProviderRequest {
102            name,
103            authentication_flow: None,
104            authorization_flow,
105            invalidation_flow,
106            property_mappings: None,
107            reply_url,
108            wtrealm,
109            assertion_valid_not_before: None,
110            assertion_valid_not_on_or_after: None,
111            session_valid_not_on_or_after: None,
112            name_id_mapping: None,
113            authn_context_class_ref_mapping: None,
114            digest_algorithm: None,
115            signature_algorithm: None,
116            signing_kp: None,
117            encryption_kp: None,
118            sign_assertion: None,
119            sign_logout_request: None,
120            default_name_id_policy: None,
121        }
122    }
123}