Skip to main content

orvanta_api/models/
saml_config_request.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 3.0.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SamlConfigRequest {
16    /// URL to fetch the IdP's SAML metadata from (fetched server-side, SSRF-guarded). Provide this or idp_metadata_xml.
17    #[serde(rename = "idp_metadata_url", skip_serializing_if = "Option::is_none")]
18    pub idp_metadata_url: Option<String>,
19    /// the IdP's SAML metadata XML, pasted directly. Provide this or idp_metadata_url.
20    #[serde(rename = "idp_metadata_xml", skip_serializing_if = "Option::is_none")]
21    pub idp_metadata_xml: Option<String>,
22    #[serde(rename = "name_id_format", skip_serializing_if = "Option::is_none")]
23    pub name_id_format: Option<String>,
24    #[serde(rename = "enabled")]
25    pub enabled: bool,
26    /// accept unsolicited (IdP-initiated) SAML responses, e.g. from an Okta \"My Apps\" or Entra app-launcher tile. Defaults to false when omitted. Unsolicited responses carry no InResponseTo, so they cannot be bound to a login this SP started and remain exposed to login-CSRF / session fixation (#589) — enable only if your IdP offers no SP-initiated entry point.
27    #[serde(rename = "allow_idp_initiated", skip_serializing_if = "Option::is_none")]
28    pub allow_idp_initiated: Option<bool>,
29}
30
31impl SamlConfigRequest {
32    pub fn new(enabled: bool) -> SamlConfigRequest {
33        SamlConfigRequest {
34            idp_metadata_url: None,
35            idp_metadata_xml: None,
36            name_id_format: None,
37            enabled,
38            allow_idp_initiated: None,
39        }
40    }
41}
42