blob: 9b765a5c5a515ace6ea86efef7c4a5850f28d0fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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>,
}
|