1use oauth2_client::re_exports::{Deserialize_enum_str, Scope, Serialize_enum_str};
2
3pub const TOKEN_URL: &str = "https://oauth2.googleapis.com/token";
4pub const AUTHORIZATION_URL: &str = "https://accounts.google.com/o/oauth2/v2/auth";
5pub const DEVICE_AUTHORIZATION_URL: &str = "https://oauth2.googleapis.com/device/code";
6
7pub mod authorization_code_grant;
8pub mod device_authorization_grant;
9pub mod jwt_authorization_grant;
10
11pub use authorization_code_grant::{
12 GoogleProviderForDesktopApps, GoogleProviderForWebServerApps,
13 GoogleProviderForWebServerAppsAccessType,
14};
15pub use device_authorization_grant::GoogleProviderForTvAndDeviceApps;
16pub use jwt_authorization_grant::GoogleProviderForServerToServerApps;
17
18pub mod extensions;
19pub use extensions::GoogleExtensionsBuilder;
20
21#[derive(Deserialize_enum_str, Serialize_enum_str, Debug, Clone, PartialEq, Eq)]
22pub enum GoogleScope {
23 #[serde(rename = "email")]
25 #[serde(alias = "https://www.googleapis.com/auth/userinfo.email")]
26 Email,
27 #[serde(rename = "profile")]
28 #[serde(alias = "https://www.googleapis.com/auth/userinfo.profile")]
29 Profile,
30 #[serde(rename = "openid")]
32 Openid,
33 #[serde(rename = "https://www.googleapis.com/auth/drive.file")]
35 DriveFile,
36 #[serde(rename = "https://www.googleapis.com/auth/youtube")]
38 Youtube,
39 #[serde(rename = "https://www.googleapis.com/auth/youtube.readonly")]
40 YoutubeReadonly,
41 #[serde(rename = "https://www.googleapis.com/auth/androidpublisher")]
43 AndroidPublisher,
44 #[serde(other)]
49 Other(String),
50}
51impl Scope for GoogleScope {}