clerk_rs/models/
create_o_auth_application_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 CreateOAuthApplicationRequest {
13	/// The name of the new OAuth application
14	#[serde(rename = "name")]
15	pub name: String,
16	/// The callback URL of the new OAuth application
17	#[serde(rename = "callback_url")]
18	pub callback_url: String,
19	/// Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces.
20	#[serde(rename = "scopes", skip_serializing_if = "Option::is_none")]
21	pub scopes: Option<String>,
22	/// If true, this client is public and cannot securely store a client secret. Only the authorization code flow with proof key for code exchange (PKCE) may be used. Public clients cannot be updated to be confidential clients, and vice versa.
23	#[serde(rename = "public", skip_serializing_if = "Option::is_none")]
24	pub public: Option<bool>,
25}
26
27impl CreateOAuthApplicationRequest {
28	pub fn new(name: String, callback_url: String) -> CreateOAuthApplicationRequest {
29		CreateOAuthApplicationRequest {
30			name,
31			callback_url,
32			scopes: None,
33			public: None,
34		}
35	}
36}