Skip to main content

akeyless_api/models/
create_auth_method_saml.rs

1/*
2 * Akeyless API
3 *
4 * The purpose of this application is to provide access to Akeyless API.
5 *
6 * The version of the OpenAPI document: 3.0
7 * Contact: support@akeyless.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CreateAuthMethodSaml : createAuthMethodSAML is a command that creates a new auth method that will be available to authenticate using SAML. [Deprecated: Use auth-method-create-saml command]
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateAuthMethodSaml {
17    /// Access expiration date in Unix timestamp (select 0 for access without expiry date)
18    #[serde(rename = "access-expires", skip_serializing_if = "Option::is_none")]
19    pub access_expires: Option<i64>,
20    /// limit the auth method usage for specific client types [cli,ui,gateway-admin,sdk,mobile,extension]
21    #[serde(rename = "allowed-client-type", skip_serializing_if = "Option::is_none")]
22    pub allowed_client_type: Option<Vec<String>>,
23    /// Allowed redirect URIs after the authentication
24    #[serde(rename = "allowed-redirect-uri", skip_serializing_if = "Option::is_none")]
25    pub allowed_redirect_uri: Option<Vec<String>>,
26    /// Subclaims to include in audit logs, e.g \"--audit-logs-claims email --audit-logs-claims username\"
27    #[serde(rename = "audit-logs-claims", skip_serializing_if = "Option::is_none")]
28    pub audit_logs_claims: Option<Vec<String>>,
29    /// A CIDR whitelist with the IPs that the access is restricted to
30    #[serde(rename = "bound-ips", skip_serializing_if = "Option::is_none")]
31    pub bound_ips: Option<Vec<String>>,
32    /// Protection from accidental deletion of this object [true/false]
33    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
34    pub delete_protection: Option<String>,
35    /// Auth Method description
36    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
37    pub description: Option<String>,
38    /// How many days before the expiration of the auth method would you like to be notified.
39    #[serde(rename = "expiration-event-in", skip_serializing_if = "Option::is_none")]
40    pub expiration_event_in: Option<Vec<String>>,
41    /// if true: enforce role-association must include sub claims
42    #[serde(rename = "force-sub-claims", skip_serializing_if = "Option::is_none")]
43    pub force_sub_claims: Option<bool>,
44    /// A CIDR whitelist with the GW IPs that the access is restricted to
45    #[serde(rename = "gw-bound-ips", skip_serializing_if = "Option::is_none")]
46    pub gw_bound_ips: Option<Vec<String>>,
47    /// IDP metadata url
48    #[serde(rename = "idp-metadata-url", skip_serializing_if = "Option::is_none")]
49    pub idp_metadata_url: Option<String>,
50    /// IDP metadata xml data
51    #[serde(rename = "idp-metadata-xml-data", skip_serializing_if = "Option::is_none")]
52    pub idp_metadata_xml_data: Option<String>,
53    /// Set output format to JSON
54    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
55    pub json: Option<bool>,
56    /// Jwt TTL
57    #[serde(rename = "jwt-ttl", skip_serializing_if = "Option::is_none")]
58    pub jwt_ttl: Option<i64>,
59    /// Auth Method name
60    #[serde(rename = "name")]
61    pub name: String,
62    /// Choose the relevant product type for the auth method [sm, sra, pm, dp, ca]
63    #[serde(rename = "product-type", skip_serializing_if = "Option::is_none")]
64    pub product_type: Option<Vec<String>>,
65    /// A list of additional sub claims delimiters (relevant only for SAML, OIDC, OAuth2/JWT)
66    #[serde(rename = "subclaims-delimiters", skip_serializing_if = "Option::is_none")]
67    pub subclaims_delimiters: Option<Vec<String>>,
68    /// Authentication token (see `/auth` and `/configure`)
69    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
70    pub token: Option<String>,
71    /// The universal identity token, Required only for universal_identity authentication
72    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
73    pub uid_token: Option<String>,
74    /// A unique identifier (ID) value should be configured for OAuth2, LDAP and SAML authentication method types and is usually a value such as the email, username, or upn for example. Whenever a user logs in with a token, these authentication types issue a \"sub claim\" that contains details uniquely identifying that user. This sub claim includes a key containing the ID value that you configured, and is used to distinguish between different users from within the same organization.
75    #[serde(rename = "unique-identifier")]
76    pub unique_identifier: String,
77}
78
79impl CreateAuthMethodSaml {
80    /// createAuthMethodSAML is a command that creates a new auth method that will be available to authenticate using SAML. [Deprecated: Use auth-method-create-saml command]
81    pub fn new(name: String, unique_identifier: String) -> CreateAuthMethodSaml {
82        CreateAuthMethodSaml {
83            access_expires: None,
84            allowed_client_type: None,
85            allowed_redirect_uri: None,
86            audit_logs_claims: None,
87            bound_ips: None,
88            delete_protection: None,
89            description: None,
90            expiration_event_in: None,
91            force_sub_claims: None,
92            gw_bound_ips: None,
93            idp_metadata_url: None,
94            idp_metadata_xml_data: None,
95            json: None,
96            jwt_ttl: None,
97            name,
98            product_type: None,
99            subclaims_delimiters: None,
100            token: None,
101            uid_token: None,
102            unique_identifier,
103        }
104    }
105}
106