diff options
Diffstat (limited to 'crates/auth-service/src/cnfg.rs')
-rw-r--r-- | crates/auth-service/src/cnfg.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/auth-service/src/cnfg.rs b/crates/auth-service/src/cnfg.rs new file mode 100644 index 0000000..9b765a5 --- /dev/null +++ b/crates/auth-service/src/cnfg.rs @@ -0,0 +1,26 @@ +use serde::Deserialize; + +#[derive(Deserialize, Clone)] +#[serde(rename_all = "kebab-case")] +pub struct LocalConfig { + pub oauth: OauthConfig, + pub profile_endpoint: String, +} + +#[derive(Deserialize, Clone)] +#[serde(rename_all = "kebab-case")] +pub struct OauthConfig { + pub discord: OauthCredentials, + pub session_lifespan: u64, + pub jwt_encoding_key: String, +} + +#[derive(Deserialize, Clone)] +#[serde(rename_all = "kebab-case")] +pub struct OauthCredentials { + pub client_id: String, + pub client_secret: String, + pub redirect_url: String, + pub auth_url: Option<String>, + pub token_url: Option<String>, +} |