Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Implement #291
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Oct 19, 2013
1 parent 78ea04a commit 2aa07f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/plugins/auth.ldap/class.ldapAuthDriver.php
Expand Up @@ -63,6 +63,9 @@ public function init($options)
parent::init($options);
$options = $this->options;
$this->ldapUrl = $options["LDAP_URL"];
if (isSet($options["LDAP_PROTOCOL"]) && $options["LDAP_PROTOCOL"] == "ldaps") {
$this->ldapUrl = "ldaps://".$this->ldapUrl;
}
if ($options["LDAP_PORT"]) $this->ldapPort = $options["LDAP_PORT"];
if ($options["LDAP_USER"]) $this->ldapAdminUsername = $options["LDAP_USER"];
if ($options["LDAP_PASSWORD"]) $this->ldapAdminPassword = $options["LDAP_PASSWORD"];
Expand Down Expand Up @@ -137,6 +140,9 @@ public function parseReplicatedParams($options, $optionsNames)
public function testLDAPConnexion($options)
{
$this->ldapUrl = $options["LDAP_URL"];
if (isSet($options["LDAP_PROTOCOL"]) && $options["LDAP_PROTOCOL"] == "ldaps") {
$this->ldapUrl = "ldaps://".$this->ldapUrl;
}
if ($options["LDAP_PORT"]) $this->ldapPort = $options["LDAP_PORT"];
if ($options["LDAP_USER"]) $this->ldapAdminUsername = $options["LDAP_USER"];
if ($options["LDAP_PASSWORD"]) $this->ldapAdminPassword = $options["LDAP_PASSWORD"];
Expand Down
1 change: 1 addition & 0 deletions core/src/plugins/auth.ldap/manifest.xml
Expand Up @@ -10,6 +10,7 @@
</client_settings>
<server_settings>
<param name="LDAP_URL" type="string" label="CONF_MESSAGE[LDAP URL]" description="CONF_MESSAGE[LDAP Server URL (IP or name)]" mandatory="true"/>
<param name="LDAP_PROTOCOL" type="select" choices="ldap|Standard (ldap),ldaps|SSL (ldaps)" default="ldap" label="CONF_MESSAGE[Protocol]" description="CONF_MESSAGE[Connect through ldap or ldaps]" mandatory="true"/>
<param name="LDAP_PORT" type="string" label="CONF_MESSAGE[LDAP Port]" description="CONF_MESSAGE[LDAP Server Port (leave blank for default)]" mandatory="false"/>
<param name="LDAP_USER" type="string" label="CONF_MESSAGE[LDAP bind username]" description="CONF_MESSAGE[Username (uid + dn) of LDAP bind user]" mandatory="false"/>
<param name="LDAP_PASSWORD" type="string" label="CONF_MESSAGE[LDAP bind password]" description="CONF_MESSAGE[Password of LDAP bind user]" mandatory="false"/>
Expand Down

0 comments on commit 2aa07f0

Please sign in to comment.