diff options
Diffstat (limited to 'crates/common/src/config/jmap/settings.rs')
-rw-r--r-- | crates/common/src/config/jmap/settings.rs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/crates/common/src/config/jmap/settings.rs b/crates/common/src/config/jmap/settings.rs index 700a5464..78f4c4a0 100644 --- a/crates/common/src/config/jmap/settings.rs +++ b/crates/common/src/config/jmap/settings.rs @@ -9,7 +9,6 @@ use std::{str::FromStr, time::Duration}; use jmap_proto::request::capability::BaseCapabilities; use mail_parser::HeaderName; use nlp::language::Language; -use store::rand::{distributions::Alphanumeric, thread_rng, Rng}; use utils::config::{cron::SimpleCron, utils::ParseValue, Config, Rate}; #[derive(Default, Clone)] @@ -63,13 +62,6 @@ pub struct JmapConfig { pub web_socket_timeout: Duration, pub web_socket_heartbeat: Duration, - pub oauth_key: String, - pub oauth_expiry_user_code: u64, - pub oauth_expiry_auth_code: u64, - pub oauth_expiry_token: u64, - pub oauth_expiry_refresh_token: u64, - pub oauth_expiry_refresh_token_renew: u64, - pub oauth_max_auth_attempts: u32, pub fallback_admin: Option<(String, String)>, pub master_user: Option<(String, String)>, @@ -321,39 +313,6 @@ impl JmapConfig { rate_anonymous: config .property_or_default::<Option<Rate>>("jmap.rate-limit.anonymous", "100/1m") .unwrap_or_default(), - oauth_key: config - .value("oauth.key") - .map(|s| s.to_string()) - .unwrap_or_else(|| { - thread_rng() - .sample_iter(Alphanumeric) - .take(64) - .map(char::from) - .collect::<String>() - }), - oauth_expiry_user_code: config - .property_or_default::<Duration>("oauth.expiry.user-code", "30m") - .unwrap_or_else(|| Duration::from_secs(30 * 60)) - .as_secs(), - oauth_expiry_auth_code: config - .property_or_default::<Duration>("oauth.expiry.auth-code", "10m") - .unwrap_or_else(|| Duration::from_secs(10 * 60)) - .as_secs(), - oauth_expiry_token: config - .property_or_default::<Duration>("oauth.expiry.token", "1h") - .unwrap_or_else(|| Duration::from_secs(60 * 60)) - .as_secs(), - oauth_expiry_refresh_token: config - .property_or_default::<Duration>("oauth.expiry.refresh-token", "30d") - .unwrap_or_else(|| Duration::from_secs(30 * 24 * 60 * 60)) - .as_secs(), - oauth_expiry_refresh_token_renew: config - .property_or_default::<Duration>("oauth.expiry.refresh-token-renew", "4d") - .unwrap_or_else(|| Duration::from_secs(4 * 24 * 60 * 60)) - .as_secs(), - oauth_max_auth_attempts: config - .property_or_default("oauth.auth.max-attempts", "3") - .unwrap_or(10), event_source_throttle: config .property_or_default("jmap.event-source.throttle", "1s") .unwrap_or_else(|| Duration::from_secs(1)), |