authentication overhaul

This commit is contained in:
2021-07-27 01:48:05 -04:00
parent 22c1abd093
commit ba11df89c8
6 changed files with 120 additions and 43 deletions
+6 -5
View File
@@ -1,14 +1,15 @@
use std::env;
use config::File;
use serde::{Deserialize};
use serde::Deserialize;
#[derive(Debug, Deserialize)]
#[derive(Clone, Debug, Deserialize)]
pub struct Configuration {
pub api_token: String,
pub api_token: Option<String>,
pub base_api: String,
pub base_url: String,
pub username: Option<String>
pub username: Option<String>,
pub password: Option<String>
}
impl Configuration {
@@ -31,4 +32,4 @@ impl Configuration {
config
}
}
}