/** * 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'); }
/** * 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); }
/** * 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; }
/** * 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(); } }
/** * 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(); } }