oauth2_apple/
lib.rs

1use oauth2_client::re_exports::{Deserialize_enum_str, Scope, Serialize_enum_str};
2
3pub const TOKEN_URL: &str = "https://appleid.apple.com/auth/token";
4pub const AUTHORIZATION_URL: &str = "https://appleid.apple.com/auth/authorize";
5pub const OAUTH2_TOKEN_URL: &str = "https://appleid.apple.com/auth/oauth2/token";
6
7pub mod authorization_code_grant;
8pub mod client_credentials_grant;
9
10pub use authorization_code_grant::AppleProviderWithAppleJs;
11pub use client_credentials_grant::AppleProviderForSearchAdsApi;
12
13#[derive(Deserialize_enum_str, Serialize_enum_str, Debug, Clone, PartialEq, Eq)]
14pub enum AppleScope {
15    //
16    #[serde(rename = "name")]
17    Name,
18    #[serde(rename = "email")]
19    Email,
20    //
21    // https://developer.apple.com/documentation/apple_search_ads/implementing_oauth_for_the_apple_search_ads_api
22    //
23    #[serde(rename = "searchadsorg")]
24    Searchadsorg,
25    //
26    // TODO
27    //
28    //
29    //
30    #[serde(other)]
31    Other(String),
32}
33impl Scope for AppleScope {}