Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion modules/ldap/lib/Auth/Process/BaseFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ public function __construct(&$config, $reserved)
if (isset($authsource['debug'])) {
$authconfig['ldap.debug'] = $authsource['debug'];
}
if (isset($authsource['referrals'])) {
$authconfig['ldap.referrals'] = $authsource['referrals'];
}
// only set when search.enabled = true
if (isset($authsource['search.enable']) && $authsource['search.enable']) {
if (isset($authsource['search.base'])) {
Expand Down Expand Up @@ -262,6 +265,7 @@ protected function getLdap()
$port = $this->config->getInteger('ldap.port', 389);
$enable_tls = $this->config->getBoolean('ldap.enable_tls', false);
$debug = $this->config->getBoolean('ldap.debug', false);
$referrals = $this->config->getBoolean('ldap.referrals', true);
$timeout = $this->config->getInteger('ldap.timeout', 0);
$username = $this->config->getString('ldap.username', null);
$password = $this->config->getString('ldap.password', null);
Expand All @@ -273,13 +277,14 @@ protected function getLdap()
' Port: ' . $port .
' Enable TLS: ' . ($enable_tls ? 'Yes' : 'No') .
' Debug: ' . ($debug ? 'Yes' : 'No') .
' Referrals: ' . ($referrals ? 'Yes' : 'No') .
' Timeout: ' . $timeout .
' Username: ' . $username .
' Password: ' . str_repeat('*', strlen($password))
);

// Connect to the LDAP server to be queried during processing
$this->ldap = new SimpleSAML_Auth_LDAP($hostname, $enable_tls, $debug, $timeout, $port);
$this->ldap = new SimpleSAML_Auth_LDAP($hostname, $enable_tls, $debug, $timeout, $port, $referrals);
$this->ldap->bind($username, $password);

// All done
Expand Down