myc_core/models/account_life_cycle_config.rs
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
use myc_config::secret_resolver::SecretResolver;
use serde::{Deserialize, Serialize};
/// This struct is used to manage the token secret and the token expiration
/// times.
///
/// This is not the final position of this struct, it will be moved to a
/// dedicated module in the future.
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct AccountLifeCycle {
/// Domain name
pub domain_name: SecretResolver<String>,
/// Domain URL
pub domain_url: Option<SecretResolver<String>>,
/// Default language
pub locale: Option<SecretResolver<String>>,
/// Token expiration time in seconds
///
/// This information is used to calculate the lifetime for new user
/// registration
pub token_expiration: SecretResolver<i64>,
/// General Purpose email name
pub noreply_name: Option<SecretResolver<String>>,
/// General Purpose email
pub noreply_email: SecretResolver<String>,
/// Support email name
pub support_name: Option<SecretResolver<String>>,
/// Support email
pub support_email: SecretResolver<String>,
/// Token secret
///
/// Toke secret is used to sign tokens
pub(crate) token_secret: SecretResolver<String>,
}