clerk_sdk_rust_community/models/
create_jwt_template_request.rs

1/*
2 * Clerk Backend API
3 *
4 * The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: support@clerk.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct CreateJwtTemplateRequest {
16    /// JWT template name
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    /// JWT template claims in JSON format
20    #[serde(rename = "claims", skip_serializing_if = "Option::is_none")]
21    pub claims: Option<serde_json::Value>,
22    /// JWT token lifetime
23    #[serde(rename = "lifetime", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub lifetime: Option<Option<f32>>,
25    /// JWT token allowed clock skew
26    #[serde(rename = "allowed_clock_skew", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub allowed_clock_skew: Option<Option<f32>>,
28    /// Whether a custom signing key/algorithm is also provided for this template
29    #[serde(rename = "custom_signing_key", skip_serializing_if = "Option::is_none")]
30    pub custom_signing_key: Option<bool>,
31    /// The custom signing algorithm to use when minting JWTs
32    #[serde(rename = "signing_algorithm", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub signing_algorithm: Option<Option<String>>,
34    /// The custom signing private key to use when minting JWTs
35    #[serde(rename = "signing_key", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub signing_key: Option<Option<String>>,
37}
38
39impl CreateJwtTemplateRequest {
40    pub fn new() -> CreateJwtTemplateRequest {
41        CreateJwtTemplateRequest {
42            name: None,
43            claims: None,
44            lifetime: None,
45            allowed_clock_skew: None,
46            custom_signing_key: None,
47            signing_algorithm: None,
48            signing_key: None,
49        }
50    }
51}
52
53