| 1 | use serde::{Deserialize, Serialize}; |
| 2 | use tsync::tsync; |
| 3 | |
| 4 | #[derive(Serialize, Deserialize, Debug, Clone)] |
| 5 | #[tsync] |
| 6 | pub struct TokenResponse { |
| 7 | pub access_token: String, |
| 8 | pub expires_in: i32, |
| 9 | pub refresh_token: Option<String>, |
| 10 | pub refresh_token_expires_in: Option<String>, |
| 11 | pub scope: String, |
| 12 | pub token_type: String, |
| 13 | } |
| 14 | |
| 15 | #[derive(Serialize, Deserialize, Debug, Clone)] |
| 16 | #[tsync] |
| 17 | pub struct OauthRedirect { |
| 18 | pub code: String, |
| 19 | pub scope: String, |
| 20 | pub authuser: i32, |
| 21 | pub prompt: String, |
| 22 | } |
| 23 | |
| 24 | #[derive(Serialize, Deserialize, Debug, Clone)] |
| 25 | #[tsync] |
| 26 | pub struct UserInfo { |
| 27 | pub id: String, |
| 28 | pub email: String, |
| 29 | pub verified_email: bool, |
| 30 | pub name: String, |
| 31 | pub given_name: String, |
| 32 | pub family_name: String, |
| 33 | pub picture: String, |
| 34 | } |