/**
  * Get Zend_Auth_Adapter_OpenId adapter
  *
  * @param string $openid_identifier
  * @return Zend_Auth_Adapter_OpenId
  */
 protected function _getOpenIdAdapter($openid_identifier = null)
 {
     $adapter = new Zend_Auth_Adapter_OpenId($openid_identifier);
     $dir = APPLICATION_PATH . '/../tmp';
     if (!file_exists($dir)) {
         if (!mkdir($dir)) {
             throw new Zend_Exception("Cannot create {$dir} to store tmp auth data.");
         }
     }
     $adapter->setStorage(new Zend_OpenId_Consumer_Storage_File($dir));
     return $adapter;
 }
Exemple #2
0
 /**
  * Get Zend_Auth_Adapter_OpenId adapter
  *
  * @param string $openid_identifier
  * @return Zend_Auth_Adapter_OpenId
  */
 protected function _getOpenIdAdapter($openid_identifier = null)
 {
     require_once 'Zend/Auth/Adapter/OpenId.php';
     require_once 'Zend/OpenId/Consumer/Storage/File.php';
     $adapter = new Zend_Auth_Adapter_OpenId($openid_identifier);
     if (!file_exists($this->_config->tmpDirectory)) {
         if (!mkdir($this->_config->tmpDirectory)) {
             throw new Zend_Exception("Cannot create {$this->_config->tmpDirectory} to store tmp auth data.");
         }
     }
     $adapter->setStorage(new Zend_OpenId_Consumer_Storage_File($this->_config->tmpDirectory));
     return $adapter;
 }