oauth2_zoho/
lib.rs

1use oauth2_client::re_exports::{Deserialize_enum_str, Scope, Serialize_enum_str};
2
3pub const TOKEN_URL: &str = "https://accounts.zoho.com/oauth/v2/token";
4pub const AUTHORIZATION_URL: &str = "https://accounts.zoho.com/oauth/v2/auth";
5
6pub mod authorization_code_grant;
7
8pub use authorization_code_grant::{
9    ZohoProviderForWebServerApps, ZohoProviderForWebServerAppsAccessType,
10};
11
12pub mod extensions;
13pub use extensions::ZohoExtensionsBuilder;
14
15/// [Ref](https://www.zoho.com/accounts/protocol/oauth-terminology.html)
16#[derive(Deserialize_enum_str, Serialize_enum_str, Debug, Clone, PartialEq, Eq)]
17pub enum ZohoScope {
18    /*
19    https://accounts.zoho.com/.well-known/openid-configuration
20    */
21    // Link with Zoho account
22    #[serde(rename = "openid")]
23    Openid,
24    // Get Your Personal Information
25    #[serde(rename = "profile")]
26    Profile,
27    // Get Email Address associated with your account
28    #[serde(rename = "email")]
29    Email,
30    /*
31    https://help.zoho.com/ signin
32    */
33    // Read your basic profile informations
34    #[serde(rename = "AaaServer.profile.READ", alias = "AAAServer.profile.READ")]
35    AaaServerProfileRead,
36    /*
37    https://www.site24x7.com/help/api/#authentication
38    */
39    #[serde(rename = "Site24x7.Account.All")]
40    Site24x7AccountAll,
41    #[serde(rename = "Site24x7.Account.Read")]
42    Site24x7AccountRead,
43    #[serde(rename = "Site24x7.Admin.All")]
44    Site24x7AdminAll,
45    #[serde(rename = "Site24x7.Admin.Read")]
46    Site24x7AdminRead,
47    #[serde(rename = "Site24x7.Reports.All")]
48    Site24x7ReportsAll,
49    #[serde(rename = "Site24x7.Reports.Read")]
50    Site24x7ReportsRead,
51    /*
52    https://www.zoho.com/crm/developer/docs/api/v3/scopes.html
53    */
54    #[serde(rename = "ZohoCRM.users.ALL")]
55    ZohoCRMUsersALL,
56    #[serde(rename = "ZohoCRM.org.ALL")]
57    ZohoCRMOrgALL,
58    //
59    //
60    //
61    #[serde(other)]
62    Other(String),
63}
64impl Scope for ZohoScope {}