protected function configure($configuration) { $this->setup = new set($configuration); $this->server = new LDAP\server($this->setup->read('server', 'ldapi:///'), $this->setup->basedn); if (data::autoType($this->setup->tls, 'boolean')) { $this->server->startTls(); } if ($this->setup->binddn) { if (!$this->bindAs($this->setup->binddn, $this->setup->bindpw)) { throw new LDAP\protocol_exception('failed to bind', $this->server); } } return true; }