summaryrefslogtreecommitdiffstats
path: root/crates/auth/src/cnfg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/auth/src/cnfg.rs')
-rw-r--r--crates/auth/src/cnfg.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/auth/src/cnfg.rs b/crates/auth/src/cnfg.rs
new file mode 100644
index 0000000..6afe2f8
--- /dev/null
+++ b/crates/auth/src/cnfg.rs
@@ -0,0 +1,23 @@
+use serde::Deserialize;
+
+#[derive(Deserialize, Clone)]
+#[serde(rename_all = "kebab-case")]
+pub struct LocalConfig {
+ pub oauth: OauthConfig,
+}
+
+#[derive(Deserialize, Clone)]
+#[serde(rename_all = "kebab-case")]
+pub struct OauthConfig {
+ pub discord: OauthCredentials,
+}
+
+#[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>,
+}