aboutsummaryrefslogtreecommitdiff
path: root/src/login/ldap_provider.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/ldap_provider.rs')
-rw-r--r--src/login/ldap_provider.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/login/ldap_provider.rs b/src/login/ldap_provider.rs
index 4e3af3c..009605d 100644
--- a/src/login/ldap_provider.rs
+++ b/src/login/ldap_provider.rs
@@ -85,11 +85,11 @@ impl LdapLoginProvider {
})
}
- fn storage_creds_from_ldap_user(&self, user: &SearchEntry) -> Result<Builders> {
- let storage: Builders = match &self.storage_specific {
- StorageSpecific::InMemory => Box::new(storage::in_memory::FullMem::new(
+ fn storage_creds_from_ldap_user(&self, user: &SearchEntry) -> Result<Builder> {
+ let storage: Builder = match &self.storage_specific {
+ StorageSpecific::InMemory => storage::in_memory::MemBuilder::new(
&get_attr(user, &self.username_attr)?
- )),
+ ),
StorageSpecific::Garage { from_config, bucket_source } => {
let aws_access_key_id = get_attr(user, &from_config.aws_access_key_id_attr)?;
let aws_secret_access_key = get_attr(user, &from_config.aws_secret_access_key_attr)?;
@@ -99,14 +99,14 @@ impl LdapLoginProvider {
};
- Box::new(storage::garage::GrgCreds {
+ storage::garage::GarageBuilder::new(storage::garage::GarageConf {
region: from_config.aws_region.clone(),
s3_endpoint: from_config.s3_endpoint.clone(),
k2v_endpoint: from_config.k2v_endpoint.clone(),
aws_access_key_id,
aws_secret_access_key,
- bucket
- })
+ bucket,
+ })?
},
};