2023-02-28 01:50:31 +00:00
|
|
|
// trifid-api, an open source reimplementation of the Defined Networking nebula management server.
|
|
|
|
// Copyright (C) 2023 c0repwn3r
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
2023-02-03 02:39:41 +00:00
|
|
|
use serde::Deserialize;
|
2023-02-04 23:44:51 +00:00
|
|
|
use url::Url;
|
2023-02-03 02:39:41 +00:00
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub struct TFConfig {
|
|
|
|
pub listen_port: u16,
|
2023-02-04 23:44:51 +00:00
|
|
|
pub db_url: String,
|
|
|
|
pub base: Url,
|
2023-02-21 02:48:46 +00:00
|
|
|
pub web_root: Url,
|
2023-02-06 02:00:25 +00:00
|
|
|
pub magic_links_valid_for: i64,
|
2023-02-07 15:37:25 +00:00
|
|
|
pub session_tokens_valid_for: i64,
|
2023-02-24 14:53:32 +00:00
|
|
|
pub totp_verification_valid_for: i64,
|
|
|
|
pub data_key: String
|
2023-02-03 02:39:41 +00:00
|
|
|
}
|