Ejemplo n.º 1
0
 /**
  * testGetRequestSignatureBaseString
  *
  * @return void
  */
 public function testGetRequestSignatureBaseString()
 {
     $options = array('consumer' => $this->consumer, 'token' => $this->ConsumerToken, 'uri' => 'http://photos.example.net/photos', 'privateCert' => '', 'publicCert' => '', 'privateCertPass' => '');
     $signatureString = Signature::signatureBaseString($this->request, $options);
     $this->assertEqual('GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacaction.jpg%26oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3D13917289812797014437%26oauth_signature_method%3DRSA-SHA1%26oauth_timestamp%3D1196666512%26oauth_version%3D1.0%26size%3Doriginal', $signatureString);
 }
Ejemplo n.º 2
0
 /**
  * Signature base string  
  *
  * @param array $extraOptions
  * @return string
  */
 public function signatureBaseString($extraOptions = array())
 {
     $options = array('uri' => $this->options['request_uri'], 'consumer' => $this->options['consumer'], 'token' => $this->options['token'], 'parameters' => $this->oauthParameters());
     $this->__updateExtraOption($extraOptions);
     $options = Set::merge($options, $extraOptions);
     return Signature::signatureBaseString($this->request, $options);
 }