public function multiFetchRequest(array $requests) { foreach ($requests as $request) { $this->signRequest($request); } return $this->fetcher->multiFetchRequest($requests); }
protected function __construct($next, $authToken, $keyName, $privateKeyObject) { parent::setNextFetcher($next); $this->authToken = $authToken; $this->keyName = $keyName; $this->privateKeyObject = $privateKeyObject; }
/** * * @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; }