コード例 #1
0
ファイル: slideshare.php プロジェクト: azuya/mmi-api
 /**
  * Load configuration settings.
  *
  * @return	void
  */
 public function __construct()
 {
     parent::__construct();
     $auth_config = $this->_auth_config;
     $this->_api_key = Arr::get($auth_config, 'api_key');
     $this->_api_secret = Arr::get($auth_config, 'api_secret');
 }
コード例 #2
0
ファイル: scribd.php プロジェクト: azuya/mmi-api
 /**
  * Load configuration settings.
  *
  * @return	void
  */
 public function __construct()
 {
     parent::__construct();
     $auth_config = $this->_auth_config;
     $this->_api_key = Arr::get($auth_config, 'api_key');
     $this->_api_secret = Arr::get($auth_config, 'api_secret');
     $this->_sign_requests = Arr::get($auth_config, 'sign_requests', FALSE);
 }
コード例 #3
0
ファイル: reddit.php プロジェクト: azuya/mmi-api
 /**
  * Load configuration settings.
  *
  * @return	void
  */
 public function __construct()
 {
     parent::__construct();
     $this->_username = Arr::get($this->_auth_config, 'username');
     // Load the cookie and user modhash values from the database
     $model = $this->_get_db_model();
     if ($model->loaded()) {
         $this->_cookie = $model->token_key;
         $this->_usermodhash = Encrypt::instance()->decode($model->token_secret);
     }
     $this->_model = $model;
 }
コード例 #4
0
ファイル: custom.php プロジェクト: azuya/mmi-api
 /**
  * Load configuration settings.
  *
  * @return	void
  */
 public function __construct()
 {
     parent::__construct();
     $auth_config = $this->_auth_config;
     // Configure the auth URLs
     $settings = array('auth_callback_url', 'username');
     foreach ($settings as $setting) {
         $var = '_' . $setting;
         $value = Arr::get($auth_config, $setting);
         if (!empty($value)) {
             $this->{$var} = $value;
         }
     }
     // Ensure the access token is valid
     if (!$this->is_valid_token()) {
         $this->_load_token();
     }
 }
コード例 #5
0
ファイル: oauth.php プロジェクト: azuya/mmi-api
 /**
  * Include the OAuth vendor files. Load configuration settings.
  * Create the signature, consumer, and token objects.
  *
  * @return	void
  */
 public function __construct()
 {
     parent::__construct();
     require_once Kohana::find_file('vendor', 'oauth/required');
     $auth_config = $this->_auth_config;
     // Configure the auth URLs
     $settings = array('auth_callback_url', 'username');
     foreach ($settings as $setting) {
         $var = '_' . $setting;
         $value = Arr::get($auth_config, $setting);
         if (!empty($value)) {
             $this->{$var} = $value;
         }
     }
     // Create the consumer, token, and signature method objects
     $this->_consumer = $this->_get_consumer($auth_config);
     $this->_token = $this->_get_token($auth_config);
     $this->_signature_method = $this->_get_signature_method();
     // Configure other OAuth settings
     $this->_realm = Arr::get($auth_config, 'realm');
     $this->_send_auth_as_data = Arr::get($auth_config, 'send_auth_as_data', FALSE);
     // Ensure the access token is valid
     if (!$this->is_valid_token()) {
         $this->_load_token();
     }
 }