Skip to main content

akeyless_api/models/
auth_method_update_oauth2.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/// AuthMethodUpdateOauth2 : authMethodUpdateOauth2 is a command that updates a new auth method that will be able to authenticate using Oauth2.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AuthMethodUpdateOauth2 {
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    /// The audience in the JWT
24    #[serde(rename = "audience", skip_serializing_if = "Option::is_none")]
25    pub audience: Option<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    /// The clients ids that the access is restricted to
30    #[serde(rename = "bound-client-ids", skip_serializing_if = "Option::is_none")]
31    pub bound_client_ids: Option<Vec<String>>,
32    /// A CIDR whitelist with the IPs that the access is restricted to
33    #[serde(rename = "bound-ips", skip_serializing_if = "Option::is_none")]
34    pub bound_ips: Option<Vec<String>>,
35    /// CertificateFile Path to a file that contain the certificate in a PEM format.
36    #[serde(rename = "cert", skip_serializing_if = "Option::is_none")]
37    pub cert: Option<String>,
38    /// CertificateFileData PEM Certificate in a Base64 format.
39    #[serde(rename = "cert-file-data", skip_serializing_if = "Option::is_none")]
40    pub cert_file_data: Option<String>,
41    /// Protection from accidental deletion of this object [true/false]
42    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
43    pub delete_protection: Option<String>,
44    /// Auth Method description
45    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
46    pub description: Option<String>,
47    /// How many days before the expiration of the auth method would you like to be notified.
48    #[serde(rename = "expiration-event-in", skip_serializing_if = "Option::is_none")]
49    pub expiration_event_in: Option<Vec<String>>,
50    /// if true: enforce role-association must include sub claims
51    #[serde(rename = "force-sub-claims", skip_serializing_if = "Option::is_none")]
52    pub force_sub_claims: Option<bool>,
53    /// Akeyless Gateway URL (Configuration Management port). Relevant only when the jwks-uri is accessible only from the gateway.
54    #[serde(rename = "gateway-url", skip_serializing_if = "Option::is_none")]
55    pub gateway_url: Option<String>,
56    /// A CIDR whitelist with the GW IPs that the access is restricted to
57    #[serde(rename = "gw-bound-ips", skip_serializing_if = "Option::is_none")]
58    pub gw_bound_ips: Option<Vec<String>>,
59    /// Issuer URL
60    #[serde(rename = "issuer", skip_serializing_if = "Option::is_none")]
61    pub issuer: Option<String>,
62    /// Set output format to JSON
63    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
64    pub json: Option<bool>,
65    /// The JSON Web Key Set (JWKS) that containing the public keys that should be used to verify any JSON Web Token (JWT) issued by the authorization server. base64 encoded string
66    #[serde(rename = "jwks-json-data", skip_serializing_if = "Option::is_none")]
67    pub jwks_json_data: Option<String>,
68    /// The URL to the JSON Web Key Set (JWKS) that containing the public keys that should be used to verify any JSON Web Token (JWT) issued by the authorization server.
69    #[serde(rename = "jwks-uri", skip_serializing_if = "Option::is_none")]
70    pub jwks_uri: Option<String>,
71    /// Jwt TTL
72    #[serde(rename = "jwt-ttl", skip_serializing_if = "Option::is_none")]
73    pub jwt_ttl: Option<i64>,
74    /// Auth Method name
75    #[serde(rename = "name")]
76    pub name: String,
77    /// Auth Method new name
78    #[serde(rename = "new-name", skip_serializing_if = "Option::is_none")]
79    pub new_name: Option<String>,
80    /// Choose the relevant product type for the auth method [sm, sra, pm, dp, ca]
81    #[serde(rename = "product-type", skip_serializing_if = "Option::is_none")]
82    pub product_type: Option<Vec<String>>,
83    /// A list of additional sub claims delimiters (relevant only for SAML, OIDC, OAuth2/JWT)
84    #[serde(rename = "subclaims-delimiters", skip_serializing_if = "Option::is_none")]
85    pub subclaims_delimiters: Option<Vec<String>>,
86    /// Authentication token (see `/auth` and `/configure`)
87    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
88    pub token: Option<String>,
89    /// The universal identity token, Required only for universal_identity authentication
90    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
91    pub uid_token: Option<String>,
92    /// 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.
93    #[serde(rename = "unique-identifier")]
94    pub unique_identifier: String,
95}
96
97impl AuthMethodUpdateOauth2 {
98    /// authMethodUpdateOauth2 is a command that updates a new auth method that will be able to authenticate using Oauth2.
99    pub fn new(name: String, unique_identifier: String) -> AuthMethodUpdateOauth2 {
100        AuthMethodUpdateOauth2 {
101            access_expires: None,
102            allowed_client_type: None,
103            audience: None,
104            audit_logs_claims: None,
105            bound_client_ids: None,
106            bound_ips: None,
107            cert: None,
108            cert_file_data: None,
109            delete_protection: None,
110            description: None,
111            expiration_event_in: None,
112            force_sub_claims: None,
113            gateway_url: None,
114            gw_bound_ips: None,
115            issuer: None,
116            json: None,
117            jwks_json_data: None,
118            jwks_uri: None,
119            jwt_ttl: None,
120            name,
121            new_name: None,
122            product_type: None,
123            subclaims_delimiters: None,
124            token: None,
125            uid_token: None,
126            unique_identifier,
127        }
128    }
129}
130