/*
* Clerk Backend API
*
* The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
*
* The version of the OpenAPI document: v1
* Contact: support@clerk.com
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateOAuthApplicationRequest {
/// The name of the new OAuth application
#[serde(rename = "name")]
pub name: String,
/// The callback URL of the new OAuth application
#[serde(rename = "callback_url")]
pub callback_url: String,
/// 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.
#[serde(rename = "scopes", skip_serializing_if = "Option::is_none")]
pub scopes: Option<String>,
/// 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.
#[serde(rename = "public", skip_serializing_if = "Option::is_none")]
pub public: Option<bool>,
}
impl CreateOAuthApplicationRequest {
pub fn new(name: String, callback_url: String) -> CreateOAuthApplicationRequest {
CreateOAuthApplicationRequest {
name,
callback_url,
scopes: None,
public: None,
}
}
}