}
/**
- * @TODO: This will replace the above two methods
+ * @TODO: This will replace the above two methods. (They are still called
+ * from the (unused/unsupported MoveItems and CreateFolder Requests).
+ *
* @return Horde_ActiveSync_Connector_Importer
*/
public function getImporter()
/**
* Const'r
+ * <pre>
+ * Required params (in addition to the base class' requirements):
+ * connector => Horde_ActiveSync_Driver_Horde_Connector_Registry object
+ * auth => Horde_Auth object
+ * </pre>
*
* @param array $params Configuration parameters.
*
if (empty($this->_params['connector'])) {
throw new InvalidArgumentException('Missing required connector object.');
}
+
+ if (empty($this->_params['auth'])) {
+ throw new InvalidArgumentException('Missing required Auth object');
+ }
+
$this->_connector = $params['connector'];
}
/**
* Authenticate to Horde
*
- * @TODO: Need to inject the auth handler (waiting for rpc.php refactor)
- *
* @see framework/ActiveSync/lib/Horde/ActiveSync/Driver/Horde_ActiveSync_Driver_Base#Logon($username, $domain, $password)
*/
public function logon($username, $password, $domain = null)
{
$this->_logger->info('Horde_ActiveSync_Driver_Horde::logon attempt for: ' . $username);
parent::logon($username, $password, $domain);
- $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
- return $auth->authenticate($username, array('password' => $password));
+ return $this->_auth->authenticate($username, array('password' => $password));
}
/**
$stat = $this->_smartStatMessage($folderid, $id, false);
}
break;
-
+
default:
$this->_endBuffer();
return false;
'connector' => new Horde_ActiveSync_Driver_Horde_Connector_Registry($params),
'ping' => $conf['activesync']['ping'],
'state_basic' => $stateMachine,
+ 'auth' => $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
);
if ($params['provisioning'] = $conf['activesync']['securitypolicies']['provisioning']) {