Example #1
0
 /**
  * Set shared credentials.
  *
  * @param String $key   Key name
  * @param String $value Value to set
  *
  * @return void
  */
 public function __set($key, $value)
 {
     switch ($key) {
         case 'access_token':
             $this->cas->add('contentful', $key, $value);
             break;
         default:
             break;
     }
 }
Example #2
0
 /**
  * Set shared credentials.
  *
  * @param String $key   Key name
  * @param String $value Value to set
  *
  * @return void
  */
 public function __set($key, $value)
 {
     switch ($key) {
         case 'consumer_key':
         case 'consumer_secret':
         case 'user_agent':
         case 'bearer_token':
             $this->cas->add('twitter', $key, $value);
             break;
         default:
             break;
     }
 }
Example #3
0
 /**
  * Set shared credentials.
  *
  * @param String $key   Key name
  * @param String $value Value to set
  *
  * @return void
  */
 public function __set($key, $value)
 {
     switch ($key) {
         case 'app_id':
         case 'app_secret':
             $this->cas->add('facebook', $key, $value);
             break;
         case 'access_token':
             $this->cas->add('facebook', $key, $value);
             $this->cas->add('facebook', 'app_secret_proof', hash_hmac('sha256', $value, $this->app_secret));
             break;
         default:
             break;
     }
 }