code/model/LDAPGateway.php
public function authenticate($username, $password)
    {
        $auth = new Zend\Authentication\AuthenticationService();
        $adapter = new Zend\Authentication\Adapter\Ldap([$this->config()->options], $username, $password);
        return $auth->authenticate($adapter);
    }
public function authenticate($username, $password)
    {
        $auth = new Zend\Authentication\AuthenticationService();
        $adapter = new Zend\Authentication\Adapter\Ldap([$this->config()->options], $username, $password);
        return $auth->authenticate($adapter);
    }
Authenticate the given username and password with LDAP.

@param string $username
@param string $password
@return \Zend\Authentication\Result