Exemplo n.º 1
0
 public function testManipulating()
 {
     $credentials = new ClientCredentials();
     $this->assertNull($credentials->getIdentifier());
     $credentials->setIdentifier('foo');
     $this->assertEquals('foo', $credentials->getIdentifier());
     $this->assertNull($credentials->getSecret());
     $credentials->setSecret('foo');
     $this->assertEquals('foo', $credentials->getSecret());
 }
Exemplo n.º 2
0
 /**
  * Get the base protocol parameters for an OAuth request.
  * Each request builds on these parameters.
  *
  * @return array
  * @see    OAuth 1.0 RFC 5849 Section 3.1
  */
 protected function baseProtocolParameters()
 {
     $dateTime = new \DateTime();
     return array('oauth_consumer_key' => $this->clientCredentials->getIdentifier(), 'oauth_nonce' => $this->nonce(), 'oauth_signature_method' => $this->signature->method(), 'oauth_timestamp' => $dateTime->format('U'), 'oauth_version' => '1.0');
 }