Exemplo n.º 1
0
 /**
  * @param \OAuth\Common\Consumer\Credentials $credentials
  * @param \OAuth\Common\Http\Client\ClientInterface $httpClient
  * @param \OAuth\Common\Storage\TokenStorageInterface $storage
  * @param \OAuth\OAuth1\Signature\SignatureInterface $signature
  * @param UriInterface|null $baseApiUri
  */
 public function __construct(Credentials $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, SignatureInterface $signature, UriInterface $baseApiUri = null)
 {
     parent::__construct($credentials, $httpClient, $storage);
     $this->signature = $signature;
     $this->baseApiUri = $baseApiUri;
     $this->signature->setHashingAlgorithm($this->getSignatureMethod());
 }
Exemplo n.º 2
0
 /**
  * @param CredentialsInterface  $credentials
  * @param ClientInterface       $httpClient
  * @param TokenStorageInterface $storage
  * @param array                 $scopes
  * @param UriInterface|null     $baseApiUri
  * @param bool                  $stateParameterInAutUrl
  * @param string                $apiVersion
  *
  * @throws InvalidScopeException
  */
 public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, $scopes = array(), UriInterface $baseApiUri = null, $stateParameterInAutUrl = false, $apiVersion = "")
 {
     parent::__construct($credentials, $httpClient, $storage);
     $this->scopes = $scopes;
     $this->baseApiUri = $baseApiUri;
     $this->apiVersion = $apiVersion;
 }
 /**
  * @param Credentials           $credentials
  * @param ClientInterface       $httpClient
  * @param TokenStorageInterface $storage
  * @param array                 $scopes
  * @param UriInterface|null     $baseApiUri
  *
  * @throws InvalidScopeException
  */
 public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, $scopes = array(), UriInterface $baseApiUri = null)
 {
     parent::__construct($credentials, $httpClient, $storage);
     foreach ($scopes as $scope) {
         if (!$this->isValidScope($scope)) {
             throw new InvalidScopeException('Scope ' . $scope . ' is not valid for service ' . get_class($this));
         }
     }
     $this->scopes = $scopes;
     $this->baseApiUri = $baseApiUri;
 }
Exemplo n.º 4
0
 /**
  * @param CredentialsInterface $credentials
  * @param \Buzz\Browser| $httpTransporter
  * @param TokenStorageInterface $storage
  * @param array $scopes
  * @param Url|string|null $baseApiUri
  * @param bool $stateParameterInAutUrl
  * @param string $apiVersion
  *
  * @throws InvalidScopeException
  */
 public function __construct(CredentialsInterface $credentials, Browser $httpTransporter, TokenStorageInterface $storage, array $scopes = [], $baseApiUri = null, $stateParameterInAutUrl = false, $apiVersion = "")
 {
     parent::__construct($credentials, $httpTransporter, $storage, $baseApiUri);
     $this->stateParameterInAuthUrl = $stateParameterInAutUrl;
     foreach ($scopes as $scope) {
         if (!$this->isValidScope($scope)) {
             throw new InvalidScopeException('Scope ' . $scope . ' is not valid for service ' . get_class($this));
         }
     }
     $this->scopes = $scopes;
     if ($apiVersion) {
         $this->apiVersion = $apiVersion;
     }
     if ($this->baseApiUri) {
         $this->injectApiVersionToUri($this->baseApiUri);
     }
 }
Exemplo n.º 5
0
 public function __construct(CredentialsInterface $credentials, Browser $httpTransporter, TokenStorageInterface $storage, $baseApiUrl)
 {
     parent::__construct($credentials, $httpTransporter, $storage, $baseApiUrl);
 }
Exemplo n.º 6
0
 /**
  * {@inheritDoc}
  */
 public function __construct(CredentialsInterface $credentials, Browser $httpTransporter, TokenStorageInterface $storage, SignatureInterface $signature, $baseApiUri = null)
 {
     parent::__construct($credentials, $httpTransporter, $storage, $baseApiUri);
     $this->signature = $signature;
     $this->signature->setHashingAlgorithm($this->getSignatureMethod());
 }