diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-11-17 18:46:22 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-11-17 18:46:22 +0100 |
commit | 36f4050a40c3ba7b9637a973063b6b5549a2c208 (patch) | |
tree | 21299ba431139f7a12a47a8df935dffeb9f30e82 /src/server.rs | |
parent | 16b38f3197167c344bb522dcfa83292ddb3c1026 (diff) | |
download | aerogramme-36f4050a40c3ba7b9637a973063b6b5549a2c208.tar.gz aerogramme-36f4050a40c3ba7b9637a973063b6b5549a2c208.zip |
WIP provider config
Diffstat (limited to 'src/server.rs')
-rw-r--r-- | src/server.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/server.rs b/src/server.rs index f0eb35f..3485a61 100644 --- a/src/server.rs +++ b/src/server.rs @@ -61,18 +61,9 @@ impl Server { } fn build(config: Config) -> Result<(ArcLoginProvider, Option<LmtpConfig>, Option<ImapConfig>)> { - let s3_region = Region { - name: config.aws_region.clone(), - endpoint: config.s3_endpoint, - }; - let k2v_region = Region { - name: config.aws_region, - endpoint: config.k2v_endpoint, - }; - let lp: ArcLoginProvider = match (config.login_static, config.login_ldap) { - (Some(st), None) => Arc::new(StaticLoginProvider::new(st, k2v_region, s3_region)?), - (None, Some(ld)) => Arc::new(LdapLoginProvider::new(ld, k2v_region, s3_region)?), + (Some(st), None) => Arc::new(StaticLoginProvider::new(st)?), + (None, Some(ld)) => Arc::new(LdapLoginProvider::new(ld)?), (Some(_), Some(_)) => { bail!("A single login provider must be set up in config file") } |