/*
* Ory APIs
*
* # Introduction Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages: | Language | Download SDK | Documentation | | -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | Dart | [pub.dev](https://pub.dev/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md) | | .NET | [nuget.org](https://www.nuget.org/packages/Ory.Client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md) | | Elixir | [hex.pm](https://hex.pm/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md) | | Go | [github.com](https://github.com/ory/client-go) | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md) | | Java | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md) | | JavaScript | [npmjs.com](https://www.npmjs.com/package/@ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) | | PHP | [packagist.org](https://packagist.org/packages/ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md) | | Python | [pypi.org](https://pypi.org/project/ory-client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md) | | Ruby | [rubygems.org](https://rubygems.org/gems/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md) | | Rust | [crates.io](https://crates.io/crates/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md) |
*
* The version of the OpenAPI document: v1.22.93
* Contact: support@ory.sh
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NormalizedProjectRevisionSamlProvider {
#[serde(rename = "acs_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub acs_url: Option<Option<String>>,
/// Further ACS URLs that the provider's Polis connection accepts as the Recipient, at most 10. Polis checks them only on the provider's own ACS URL route, so they apply only to a provider with a connection-specific ACS URL. A save that leaves the field out, or sends null, keeps the provider's stored list, and an empty list removes it. A JSON Patch remove of the field removes the list, like an empty list. Switching the provider to the native engine removes its list. The onboarding portal keeps a provider's stored list.
#[serde(rename = "additional_acs_urls", skip_serializing_if = "Option::is_none")]
pub additional_acs_urls: Option<Vec<String>>,
/// The digest algorithms accepted when validating signed SAML messages; empty means engine defaults (native engine only).
#[serde(rename = "allowed_digest_algorithms", skip_serializing_if = "Option::is_none")]
pub allowed_digest_algorithms: Option<Vec<String>>,
/// The NameID formats accepted from the IdP; empty means any (native engine only).
#[serde(rename = "allowed_name_id_formats", skip_serializing_if = "Option::is_none")]
pub allowed_name_id_formats: Option<Vec<String>>,
/// The signature algorithms accepted when validating signed SAML messages; empty means engine defaults (native engine only).
#[serde(rename = "allowed_signature_algorithms", skip_serializing_if = "Option::is_none")]
pub allowed_signature_algorithms: Option<Vec<String>>,
#[serde(rename = "audience_override_base_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub audience_override_base_url: Option<Option<String>>,
/// The SAML binding used to send authentication requests to the IdP (native engine only): \"http-post\" or \"http-redirect\". http-post SAMLBindingHTTPPost sends the AuthnRequest to the IdP via an auto-submitting HTML form. http-redirect SAMLBindingHTTPRedirect sends the AuthnRequest to the IdP via an HTTP redirect.
#[serde(rename = "binding", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub binding: Option<Option<BindingEnum>>,
/// The maximum allowed clock skew in seconds when validating assertion time conditions, between 0 and 300 (native engine only).
#[serde(rename = "clock_skew_seconds", skip_serializing_if = "Option::is_none")]
pub clock_skew_seconds: Option<i64>,
/// The Project's Revision Creation Date
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
/// The SAML engine serving this provider: \"jackson\" (default) or \"native\". jackson SAMLEngineJackson routes the provider through the jackson (Polis) proxy. native SAMLEngineNative routes the provider through the native Kratos SAML engine.
#[serde(rename = "engine", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub engine: Option<Option<EngineEnum>>,
/// Require the IdP to re-authenticate the subject even if it has an existing session (native engine only).
#[serde(rename = "force_authn", skip_serializing_if = "Option::is_none")]
pub force_authn: Option<bool>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// IdPInitiatedLoginEnabled enables IdP-initiated login for this provider. When enabled, users can start a login from their identity provider's app launcher. The Polis connection's default redirect URL then points at the Kratos IdP-initiated login entry point instead of the SAML callback.
#[serde(rename = "idp_initiated_login_enabled", skip_serializing_if = "Option::is_none")]
pub idp_initiated_login_enabled: Option<bool>,
#[serde(rename = "idp_metadata_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub idp_metadata_url: Option<Option<String>>,
/// Label represents an optional label which can be used in the UI generation.
#[serde(rename = "label", skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
/// Mapper specifies the JSONNet code snippet which uses the OpenID Connect Provider's data (e.g. GitHub or Google profile information) to hydrate the identity's data.
#[serde(rename = "mapper_url", skip_serializing_if = "Option::is_none")]
pub mapper_url: Option<String>,
#[serde(rename = "organization_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub organization_id: Option<Option<String>>,
/// The Revision's ID this schema belongs to
#[serde(rename = "project_revision_id", skip_serializing_if = "Option::is_none")]
pub project_revision_id: Option<String>,
/// ID is the provider's ID
#[serde(rename = "provider_id", skip_serializing_if = "Option::is_none")]
pub provider_id: Option<String>,
#[serde(rename = "proxy_acs_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub proxy_acs_url: Option<Option<String>>,
#[serde(rename = "proxy_saml_audience_override", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub proxy_saml_audience_override: Option<Option<String>>,
/// RawIDPMetadataXML is the raw XML metadata of the IDP.
#[serde(rename = "raw_idp_metadata_xml", skip_serializing_if = "Option::is_none")]
pub raw_idp_metadata_xml: Option<String>,
/// Reject SAML responses whose assertion is not encrypted (native engine only).
#[serde(rename = "require_encrypted_assertion", skip_serializing_if = "Option::is_none")]
pub require_encrypted_assertion: Option<bool>,
/// Sign SAML authentication requests sent to the IdP (native engine only).
#[serde(rename = "sign_authn_requests", skip_serializing_if = "Option::is_none")]
pub sign_authn_requests: Option<bool>,
#[serde(rename = "sp_entity_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub sp_entity_id: Option<Option<String>>,
/// State indicates the state of the provider Only providers with state `enabled` will be used for authentication enabled ThirdPartyProviderStateEnabled disabled ThirdPartyProviderStateDisabled
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<StateEnum>,
/// UpdateIdentityOnLogin controls whether the identity is updated from SAML claims on each login. Possible values are \"never\" (default) and \"automatic\". never UpdateIdentityOnLoginNever disables identity updates on login (default). automatic UpdateIdentityOnLoginAutomatic re-runs the Jsonnet claims mapper on every login and updates the identity's traits and metadata automatically.
#[serde(rename = "update_identity_on_login", skip_serializing_if = "Option::is_none")]
pub update_identity_on_login: Option<UpdateIdentityOnLoginEnum>,
/// Last Time Project's Revision was Updated
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
/// Valid to dates of all signing certs associated with the SAML connection
#[serde(rename = "valid_to", skip_serializing_if = "Option::is_none")]
pub valid_to: Option<Vec<String>>,
}
impl NormalizedProjectRevisionSamlProvider {
pub fn new() -> NormalizedProjectRevisionSamlProvider {
NormalizedProjectRevisionSamlProvider {
acs_url: None,
additional_acs_urls: None,
allowed_digest_algorithms: None,
allowed_name_id_formats: None,
allowed_signature_algorithms: None,
audience_override_base_url: None,
binding: None,
clock_skew_seconds: None,
created_at: None,
engine: None,
force_authn: None,
id: None,
idp_initiated_login_enabled: None,
idp_metadata_url: None,
label: None,
mapper_url: None,
organization_id: None,
project_revision_id: None,
provider_id: None,
proxy_acs_url: None,
proxy_saml_audience_override: None,
raw_idp_metadata_xml: None,
require_encrypted_assertion: None,
sign_authn_requests: None,
sp_entity_id: None,
state: None,
update_identity_on_login: None,
updated_at: None,
valid_to: None,
}
}
}
/// The SAML binding used to send authentication requests to the IdP (native engine only): \"http-post\" or \"http-redirect\". http-post SAMLBindingHTTPPost sends the AuthnRequest to the IdP via an auto-submitting HTML form. http-redirect SAMLBindingHTTPRedirect sends the AuthnRequest to the IdP via an HTTP redirect.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum BindingEnum {
#[serde(rename = "http-post")]
HttpPost,
#[serde(rename = "http-redirect")]
HttpRedirect,
}
impl Default for BindingEnum {
fn default() -> BindingEnum {
Self::HttpPost
}
}
/// The SAML engine serving this provider: \"jackson\" (default) or \"native\". jackson SAMLEngineJackson routes the provider through the jackson (Polis) proxy. native SAMLEngineNative routes the provider through the native Kratos SAML engine.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum EngineEnum {
#[serde(rename = "jackson")]
Jackson,
#[serde(rename = "native")]
Native,
}
impl Default for EngineEnum {
fn default() -> EngineEnum {
Self::Jackson
}
}
/// State indicates the state of the provider Only providers with state `enabled` will be used for authentication enabled ThirdPartyProviderStateEnabled disabled ThirdPartyProviderStateDisabled
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StateEnum {
#[serde(rename = "enabled")]
Enabled,
#[serde(rename = "disabled")]
Disabled,
}
impl Default for StateEnum {
fn default() -> StateEnum {
Self::Enabled
}
}
/// UpdateIdentityOnLogin controls whether the identity is updated from SAML claims on each login. Possible values are \"never\" (default) and \"automatic\". never UpdateIdentityOnLoginNever disables identity updates on login (default). automatic UpdateIdentityOnLoginAutomatic re-runs the Jsonnet claims mapper on every login and updates the identity's traits and metadata automatically.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum UpdateIdentityOnLoginEnum {
#[serde(rename = "never")]
Never,
#[serde(rename = "automatic")]
Automatic,
}
impl Default for UpdateIdentityOnLoginEnum {
fn default() -> UpdateIdentityOnLoginEnum {
Self::Never
}
}