Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 7769a7e

Browse files
melangervyskocilpavel
authored andcommitted
Add startTLS support to AdapterLdap
1 parent b725367 commit 7769a7e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/AdapterLdap.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class AdapterLdap extends Adapter
3030
const LDAP_USER = 'ldap.username';
3131
const LDAP_PASSWORD = 'ldap.password';
3232
const LDAP_BASE = 'ldap.base';
33+
const LDAP_TLS = 'ldap.enable_tls';
3334
const PERUN_FACILITY_ID = 'perunFacilityId';
3435
const CN = 'cn';
3536
const DESCRIPTION = 'description';
@@ -57,8 +58,9 @@ public function __construct($configFileName = null)
5758
$ldapUser = $conf->getString(self::LDAP_USER, null);
5859
$ldapPassword = $conf->getString(self::LDAP_PASSWORD, null);
5960
$this->ldapBase = $conf->getString(self::LDAP_BASE);
61+
$ldapEnableTLS = $conf->getBoolean(self::LDAP_TLS, false);
6062

61-
$this->connector = new LdapConnector($ldapHostname, $ldapUser, $ldapPassword);
63+
$this->connector = new LdapConnector($ldapHostname, $ldapUser, $ldapPassword, $ldapEnableTLS);
6264
$this->fallbackAdapter = new AdapterRpc();
6365
}
6466

0 commit comments

Comments
 (0)