summaryrefslogtreecommitdiffstats
path: root/crates/auth-service/src/cnfg.rs
diff options
context:
space:
mode:
authorrtkay123 <dev@kanjala.com>2025-07-26 19:24:38 +0200
committerrtkay123 <dev@kanjala.com>2025-07-26 19:24:38 +0200
commite26d87f4fa18999c6bcfbcf32cfa85adab11acdd (patch)
tree603c6dacb6c448984bdcc5fa2b4a9314f1a23960 /crates/auth-service/src/cnfg.rs
parent236876f1d0539ac22a3977fd8599933725ad0f90 (diff)
downloadsellershut-e26d87f4fa18999c6bcfbcf32cfa85adab11acdd.tar.bz2
sellershut-e26d87f4fa18999c6bcfbcf32cfa85adab11acdd.zip
feat(auth): create user call
Diffstat (limited to 'crates/auth-service/src/cnfg.rs')
-rw-r--r--crates/auth-service/src/cnfg.rs26
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>,
+}