clerk_rs/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.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct CreateJwtTemplateRequest {
13	/// JWT template name
14	#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
15	pub name: Option<String>,
16	/// JWT template claims in JSON format
17	#[serde(rename = "claims", skip_serializing_if = "Option::is_none")]
18	pub claims: Option<serde_json::Value>,
19	/// JWT token lifetime
20	#[serde(
21		rename = "lifetime",
22		default,
23		with = "::serde_with::rust::double_option",
24		skip_serializing_if = "Option::is_none"
25	)]
26	pub lifetime: Option<Option<f32>>,
27	/// JWT token allowed clock skew
28	#[serde(
29		rename = "allowed_clock_skew",
30		default,
31		with = "::serde_with::rust::double_option",
32		skip_serializing_if = "Option::is_none"
33	)]
34	pub allowed_clock_skew: Option<Option<f32>>,
35	/// Whether a custom signing key/algorithm is also provided for this template
36	#[serde(rename = "custom_signing_key", skip_serializing_if = "Option::is_none")]
37	pub custom_signing_key: Option<bool>,
38	/// The custom signing algorithm to use when minting JWTs
39	#[serde(
40		rename = "signing_algorithm",
41		default,
42		with = "::serde_with::rust::double_option",
43		skip_serializing_if = "Option::is_none"
44	)]
45	pub signing_algorithm: Option<Option<String>>,
46	/// The custom signing private key to use when minting JWTs
47	#[serde(
48		rename = "signing_key",
49		default,
50		with = "::serde_with::rust::double_option",
51		skip_serializing_if = "Option::is_none"
52	)]
53	pub signing_key: Option<Option<String>>,
54}
55
56impl CreateJwtTemplateRequest {
57	pub fn new() -> CreateJwtTemplateRequest {
58		CreateJwtTemplateRequest {
59			name: None,
60			claims: None,
61			lifetime: None,
62			allowed_clock_skew: None,
63			custom_signing_key: None,
64			signing_algorithm: None,
65			signing_key: None,
66		}
67	}
68}