aboutsummaryrefslogtreecommitdiff
path: root/src/login/ldap_provider.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-02-23 17:01:51 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-02-23 17:01:51 +0100
commit02a8537556236437d905cefe8aa2c5d0a96f129a (patch)
tree823c209287b2bd5373bf941ea5362e7f97eb94f6 /src/login/ldap_provider.rs
parenta579382042e0e1af95a00e97647a2cc3794fb108 (diff)
downloadaerogramme-02a8537556236437d905cefe8aa2c5d0a96f129a.tar.gz
aerogramme-02a8537556236437d905cefe8aa2c5d0a96f129a.zip
Replace with a single AWS HTTP client
Diffstat (limited to 'src/login/ldap_provider.rs')
-rw-r--r--src/login/ldap_provider.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/login/ldap_provider.rs b/src/login/ldap_provider.rs
index e73e1dc..42c993d 100644
--- a/src/login/ldap_provider.rs
+++ b/src/login/ldap_provider.rs
@@ -21,6 +21,7 @@ pub struct LdapLoginProvider {
storage_specific: StorageSpecific,
in_memory_store: storage::in_memory::MemDb,
+ garage_store: storage::garage::GarageRoot,
}
enum BucketSource {
@@ -91,7 +92,11 @@ impl LdapLoginProvider {
mail_attr: config.mail_attr,
crypto_root_attr: config.crypto_root_attr,
storage_specific: specific,
+ //@FIXME should be created outside of the login provider
+ //Login provider should return only a cryptoroot + a storage URI
+ //storage URI that should be resolved outside...
in_memory_store: storage::in_memory::MemDb::new(),
+ garage_store: storage::garage::GarageRoot::new(),
})
}
@@ -114,7 +119,7 @@ impl LdapLoginProvider {
BucketSource::Attr(a) => get_attr(user, &a)?,
};
- storage::garage::GarageBuilder::new(storage::garage::GarageConf {
+ self.garage_store.user(storage::garage::GarageConf {
region: from_config.aws_region.clone(),
s3_endpoint: from_config.s3_endpoint.clone(),
k2v_endpoint: from_config.k2v_endpoint.clone(),