diff options
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs index ab40824..b77288b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -41,8 +41,16 @@ pub struct LoginStaticUser { pub struct LoginLdapConfig { pub ldap_server: String, - pub search_dn: String, + #[serde(default)] + pub pre_bind_on_login: bool, + pub bind_dn: Option<String>, + pub bind_password: Option<String>, + + pub search_base: String, pub username_attr: String, + #[serde(default = "default_mail_attr")] + pub mail_attr: String, + pub aws_access_key_id_attr: String, pub aws_secret_access_key_attr: String, pub user_secret_attr: String, @@ -62,3 +70,7 @@ pub fn read_config(config_file: PathBuf) -> Result<Config> { Ok(toml::from_str(&config)?) } + +fn default_mail_attr() -> String { + "mail".into() +} |