示例#1
0
 public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, SignatureInterface $signature, UriInterface $baseApiUri = null)
 {
     parent::__construct($credentials, $httpClient, $storage, $signature, $baseApiUri);
     if (null === $baseApiUri) {
         $this->baseApiUri = new Uri('https://api.fitbit.com/1/');
     }
 }
示例#2
0
 public function __construct(Credentials $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, SignatureInterface $signature, UriInterface $baseApiUri = null)
 {
     parent::__construct($credentials, $httpClient, $storage, $signature, $baseApiUri);
     if (null === $baseApiUri) {
         $this->baseApiUri = new Uri('http://www.flickr.com/services/api/');
     }
 }
示例#3
0
 public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, SignatureInterface $signature, UriInterface $baseApiUri = null)
 {
     parent::__construct($credentials, $httpClient, $storage, $signature, $baseApiUri);
     if ($baseApiUri === null) {
         $this->baseApiUri = new Uri(BX_DOL_OAUTH_URL_BASE);
     }
 }
示例#4
0
文件: Redmine.php 项目: clee03/metal
 public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, SignatureInterface $signature, UriInterface $baseApiUri)
 {
     parent::__construct($credentials, $httpClient, $storage, $signature, $baseApiUri);
     if (null === $baseApiUri) {
         throw new \Exception('baseApiUri is a required argument.');
     }
 }
 public function __construct(Credentials $credentials, ClientInterface $httpClient = null, TokenStorageInterface $storage = null, SignatureInterface $signature = null, UriInterface $baseApiUri = null)
 {
     if (!isset($httpClient)) {
         $httpClient = new \OAuth\Common\Http\Client\StreamClient();
     }
     if (!isset($storage)) {
         $storage = new \OAuth\Common\Storage\Session();
     }
     if (!isset($signature)) {
         $signature = new \OAuth\OAuth1\Signature\Signature($credentials);
     }
     parent::__construct($credentials, $httpClient, $storage, $signature, $baseApiUri);
 }
示例#6
0
 public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, SignatureInterface $signature, UriInterface $baseApiUri = null)
 {
     //This is a bit of a hack; but Not really sure what else todo.
     $signature = new SignatureRsaSha1($credentials);
     parent::__construct($credentials, $httpClient, $storage, $signature, $baseApiUri);
     if (null === $baseApiUri) {
         $this->baseApiUri = new Uri('https://api.xero.com/api.xro/2.0/');
     }
     //Hack like a shit c**t.
     $a = new \OAuth\OAuth1\Token\StdOAuth1Token();
     $a->setAccessToken($this->credentials->getConsumerId());
     $a->setAccessTokenSecret($this->credentials->getConsumerSecret());
     $this->storage->storeAccessToken($this->service(), $a);
 }
 public function __construct(Credentials $credentials, ClientInterface $httpClient = null, TokenStorageInterface $storage = null, SignatureInterface $signature = null, UriInterface $baseApiUri = null)
 {
     if (!isset($httpClient)) {
         $httpClient = new \OAuth\Common\Http\Client\StreamClient();
         $httpClient->setTimeout(self::DEFAULT_TIMEOUT);
     }
     if (!isset($storage)) {
         $storage = new \OAuth\Common\Storage\Session();
     }
     if (!isset($signature)) {
         $signature = new \Magento\TestFramework\Authentication\Rest\OauthClient\Signature($credentials);
     }
     parent::__construct($credentials, $httpClient, $storage, $signature, $baseApiUri);
 }
示例#8
0
 /**
  * {@inheritDoc}
  */
 public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, SignatureInterface $signature, UriInterface $baseApiUri = null, Service $service)
 {
     $this->service = $service;
     parent::__construct($credentials, $httpClient, $storage, $signature, $baseApiUri);
 }