myc_core/models/
account_life_cycle_config.rs

1use myc_config::secret_resolver::SecretResolver;
2use serde::{Deserialize, Serialize};
3
4/// This struct is used to manage the token secret and the token expiration
5/// times.
6///
7/// This is not the final position of this struct, it will be moved to a
8/// dedicated module in the future.
9#[derive(Serialize, Deserialize, Debug, Clone)]
10#[serde(rename_all = "camelCase")]
11pub struct AccountLifeCycle {
12    /// Domain name
13    pub domain_name: SecretResolver<String>,
14
15    /// Domain URL
16    pub domain_url: Option<SecretResolver<String>>,
17
18    /// Default language
19    pub locale: Option<SecretResolver<String>>,
20
21    /// Token expiration time in seconds
22    ///
23    /// This information is used to calculate the lifetime for new user
24    /// registration
25    pub token_expiration: SecretResolver<i64>,
26
27    /// General Purpose email name
28    pub noreply_name: Option<SecretResolver<String>>,
29
30    /// General Purpose email
31    pub noreply_email: SecretResolver<String>,
32
33    /// Support email name
34    pub support_name: Option<SecretResolver<String>>,
35
36    /// Support email
37    pub support_email: SecretResolver<String>,
38
39    /// Token secret
40    ///
41    /// Toke secret is used to sign tokens
42    pub(crate) token_secret: SecretResolver<String>,
43}