svix_webhook_with_clone/models/
oauth2_auth_method_in.rs

1/*
2 * Svix API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.1.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[allow(unused_imports)]
12use crate::models;
13#[allow(unused_imports)]
14use serde::{Deserialize, Serialize};
15        
16            /// Oauth2AuthMethodIn : The method used for authenticating to the OAuth authorization server.  `clientSecretJwt` will construct a JWT used for authentication with the oauth authorization server. This method is less commonly used and may not be supported by all oauth providers. `clientSecretBasic` will authenticate to the oauth authorization server using an `Authorization` header with the client secret as the value. This is the most common means of authentication. `clientSecretPost` will authenticate to the oauth authorization server by passing the client secret in a `client_secret` field in the request body. This method may not be supported by all oauth providers, and in general `clientSecretBasic` should be preferred.
17                /// The method used for authenticating to the OAuth authorization server.  `clientSecretJwt` will construct a JWT used for authentication with the oauth authorization server. This method is less commonly used and may not be supported by all oauth providers. `clientSecretBasic` will authenticate to the oauth authorization server using an `Authorization` header with the client secret as the value. This is the most common means of authentication. `clientSecretPost` will authenticate to the oauth authorization server by passing the client secret in a `client_secret` field in the request body. This method may not be supported by all oauth providers, and in general `clientSecretBasic` should be preferred.
18                #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
19                pub enum Oauth2AuthMethodIn {
20                        #[serde(rename = "clientSecretJwt")]
21                        ClientSecretJwt,
22                                            #[serde(rename = "clientSecretBasic")]
23                        ClientSecretBasic,
24                                            #[serde(rename = "clientSecretPost")]
25                        ClientSecretPost,
26                    
27                }
28
29                impl std::fmt::Display for Oauth2AuthMethodIn {
30                fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
31                match self {
32                        Self::ClientSecretJwt => write!(f, "clientSecretJwt"),
33                        Self::ClientSecretBasic => write!(f, "clientSecretBasic"),
34                        Self::ClientSecretPost => write!(f, "clientSecretPost"),
35                }
36                }
37                }
38
39            impl Default for Oauth2AuthMethodIn {
40            fn default() -> Oauth2AuthMethodIn {
41                Self::ClientSecretJwt
42            }
43            }
44