- _hostName = properties["Hostname"].toString();
- _port = properties["Port"].toInt();
- _baseDN = properties["Base DN"].toString();
- _filter = properties["Filter"].toString();
- _bindDN = properties["Bind DN"].toString();
- _bindPassword = properties["Bind Password"].toString();
- _uidAttribute = properties["UID Attribute"].toString();
+ if (loadFromEnvironment) {
+ _hostName = environment.value("AUTH_LDAP_HOSTNAME");
+ _port = environment.value("AUTH_LDAP_PORT").toInt();
+ _bindDN = environment.value("AUTH_LDAP_BIND_DN");
+ _bindPassword = environment.value("AUTH_LDAP_BIND_PASSWORD");
+ _baseDN = environment.value("AUTH_LDAP_BASE_DN");
+ _filter = environment.value("AUTH_LDAP_FILTER");
+ _uidAttribute = environment.value("AUTH_LDAP_UID_ATTRIBUTE");
+ } else {
+ _hostName = properties["Hostname"].toString();
+ _port = properties["Port"].toInt();
+ _bindDN = properties["BindDN"].toString();
+ _bindPassword = properties["BindPassword"].toString();
+ _baseDN = properties["BaseDN"].toString();
+ _filter = properties["Filter"].toString();
+ _uidAttribute = properties["UidAttribute"].toString();
+ }