Exemplo n.º 1
0
 public function testConfigObject()
 {
     $config = new Config\Config(array('host' => TESTS_ZEND_LDAP_HOST, 'username' => TESTS_ZEND_LDAP_USERNAME, 'password' => TESTS_ZEND_LDAP_PASSWORD, 'baseDn' => TESTS_ZEND_LDAP_BASE_DN));
     $ldap = new Ldap\Ldap($config);
     $this->assertEquals(array('host' => TESTS_ZEND_LDAP_HOST, 'port' => 0, 'useSsl' => false, 'username' => TESTS_ZEND_LDAP_USERNAME, 'password' => TESTS_ZEND_LDAP_PASSWORD, 'bindRequiresDn' => false, 'baseDn' => TESTS_ZEND_LDAP_BASE_DN, 'accountCanonicalForm' => null, 'accountDomainName' => null, 'accountDomainNameShort' => null, 'accountFilterFormat' => null, 'allowEmptyPassword' => false, 'useStartTls' => false, 'optReferrals' => false, 'tryUsernameSplit' => true, 'networkTimeout' => null), $ldap->getOptions());
 }
Exemplo n.º 2
0
 /**
  * Set an Ldap connection
  *
  * @param  Zend_Ldap $ldap An existing Ldap object
  * @return Zend\Authentication\Adapter\Ldap Provides a fluent interface
  */
 public function setLdap(\Zend\Ldap\Ldap $ldap)
 {
     $this->_ldap = $ldap;
     $this->setOptions(array($ldap->getOptions()));
     return $this;
 }
Exemplo n.º 3
0
 /**
  * Set an Ldap connection
  *
  * @param  ZendLdap\Ldap $ldap An existing Ldap object
  * @return Ldap Provides a fluent interface
  */
 public function setLdap(ZendLdap\Ldap $ldap)
 {
     $this->ldap = $ldap;
     $this->setOptions([$ldap->getOptions()]);
     return $this;
 }