Inheritance: extends CComponent, implements IAuthService
コード例 #1
0
ファイル: EOAuthService.php プロジェクト: RSol/yupe
 /**
  * Initializes a new session and return a cURL handle.
  * @param string $url url to request.
  * @param array $options HTTP request options. Keys: query, data, referer.
  * @param boolean $parseJson Whether to parse response in json format.
  * @return cURL handle.
  */
 protected function initRequest($url, $options = array())
 {
     $ch = parent::initRequest($url, $options);
     curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
     if (isset($params['data'])) {
         curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml", "SOAPAction: \"/soap/action/query\"", "Content-length: " . strlen($data)));
     }
     return $ch;
 }
コード例 #2
0
 /**
  * Initialize the component.
  *
  * @param EAuth $component the component instance.
  * @param array $options properties initialization.
  */
 public function init($component, $options = array())
 {
     parent::init($component, $options);
     $this->auth = Yii::app()->loid->load();
     //$this->auth = new EOpenID();
 }
コード例 #3
0
ファイル: EOAuth2Service.php プロジェクト: nodge/yii-eauth
 public function init($component, $options = array())
 {
     parent::init($component, $options);
     // Try to restore access token from session.
     $this->restoreAccessToken();
 }
コード例 #4
0
ファイル: EOAuthService.php プロジェクト: itmages/yii-eauth
 /**
  * Initializes a new session and return a cURL handle.
  *
  * @param string $url url to request.
  * @param array $options HTTP request options. Keys: query, data, referer.
  * @param boolean $parseJson Whether to parse response in json format.
  * @return cURL handle.
  */
 protected function initRequest($url, $options = array())
 {
     $ch = parent::initRequest($url, $options);
     curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
     return $ch;
 }