Example #1
0
 public function set(ProviderInterface $request)
 {
     $timestamp = time();
     $hmac = hash_hmac($this->_encoder, $this->_consumer . $request->getData() . $timestamp, $this->_private_key);
     $_tmp = array('ts' => $timestamp, 'consumer' => $this->_consumer, 'token' => base64_encode($hmac));
     $request->setUrl($request->getUrl() . '?' . http_build_query($_tmp));
 }
Example #2
0
 public function set(ProviderInterface $request)
 {
     $header = array('Authorization' => 'Basic ' . $this->_auth);
     $request->mergeHeaders($header);
 }