public function __construct($config)
 {
     $config['request_method'] = self::REQUEST_METHOD_QUERY;
     $config['version'] = null;
     $this->consumer_secret = $config['consumer_secret'];
     parent::__construct($config);
 }
Exemple #2
0
 public function testAllowsRealm()
 {
     $config = $this->config;
     $config['realm'] = 'foo';
     $s = new Oauth1($config);
     $client = new Client();
     $request = $client->createRequest('GET', 'http://httpbin.org', ['auth' => 'oauth']);
     $before = new BeforeEvent(new Transaction($client, $request));
     $s->onBefore($before);
     $this->assertTrue($request->hasHeader('Authorization'));
     $this->assertContains('OAuth realm="foo",', $request->getHeader('Authorization'));
 }