Ejemplo n.º 1
0
 public function multiFetchRequest(array $requests)
 {
     foreach ($requests as $request) {
         $this->signRequest($request);
     }
     return $this->fetcher->multiFetchRequest($requests);
 }
Ejemplo n.º 2
0
 protected function __construct($next, $authToken, $keyName, $privateKeyObject)
 {
     parent::setNextFetcher($next);
     $this->authToken = $authToken;
     $this->keyName = $keyName;
     $this->privateKeyObject = $privateKeyObject;
 }
Ejemplo n.º 3
0
 /**
  *
  * @param oauthCrypter used to encrypt transient information we store on the
  *        client.
  * @param authToken user's gadget security token
  * @param params OAuth fetch parameters sent from makeRequest
  * @param tokenStore storage for long lived tokens.
  */
 public function __construct($tokenStore, $oauthCrypter, $nextFetcher, $authToken, OAuthRequestParams $params)
 {
     parent::setNextFetcher($nextFetcher);
     $this->oauthCrypter = $oauthCrypter;
     $this->authToken = $authToken;
     $this->bypassSpecCache = $params->getBypassSpecCache();
     $this->requestParams = $params;
     $this->newClientState = null;
     $this->aznUrl = null;
     $this->error = null;
     $this->errorText = null;
     $origClientState = $params->getOrigClientState();
     if ($origClientState != null && strlen($origClientState) > 0) {
         try {
             $this->origClientState = $this->oauthCrypter->unwrap($origClientState, self::$CLIENT_STATE_MAX_AGE_SECS);
         } catch (BlobCrypterException $e) {
             // Probably too old, pretend we never saw it at all.
         }
     }
     if ($this->origClientState == null) {
         $this->origClientState = array();
     }
     $this->tokenStore = $tokenStore;
 }