diff options
author | Ashelyn Rose <git@ashen.earth> | 2025-02-19 15:51:28 -0700 |
---|---|---|
committer | Ashelyn Rose <git@ashen.earth> | 2025-02-19 15:51:28 -0700 |
commit | e8314458ccdf4d3c68969b206cd29f2490fb6308 (patch) | |
tree | 3eac29d969edc813ae407f0b2e114b033c5d8164 /app/src/state.rs | |
parent | 5e8d3bc7008d29115bc520a75a9e49c00e2c270f (diff) |
Refactor oauth into its own module
Diffstat (limited to 'app/src/state.rs')
-rw-r--r-- | app/src/state.rs | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/app/src/state.rs b/app/src/state.rs deleted file mode 100644 index 44e74ed..0000000 --- a/app/src/state.rs +++ /dev/null @@ -1,46 +0,0 @@ -use tokio::sync::mpsc::Sender; - -#[derive(Clone)] -pub struct AppState { - pub preferences: (), - pub accounts: Vec<Account>, -} - -impl AppState { - pub fn default() -> Self { - Self { - preferences: (), - accounts: Vec::new(), - - } - } -} - -#[derive(Clone)] -pub struct Account { - pub server_domain: String, - pub handle_domain: Option<String>, - pub client_credential: ClientCredential, - pub api_credential: ApiCredential, -} - -#[derive(Clone)] -pub struct ClientCredential { - pub client_name: String, - pub client_id: String, - pub client_secret: Option<String>, -} - -#[derive(Clone)] -pub struct AuthCode (pub String); - -#[derive(Clone)] -pub enum ApiCredential { - None, - Pending(Sender<AuthCode>), - Some { - token: String, - refresh: Option<String> - } -} - |