redirectLimit) { $attempts++; $response = $this->getHttpClient()->send($request, [ 'allow_redirects' => false ]); if ($this->isRedirect($response)) { $redirectUrl = new Uri($response->getHeader('Location')[0]); $request = $request->withUri($redirectUrl); } else { break; } } return $response; } /** * Returns the HTTP client instance. * * @return GuzzleHttp\ClientInterface */ abstract public function getHttpClient(); /** * Retrieves current redirect limit. * * @return integer */ public function getRedirectLimit() { return $this->redirectLimit; } /** * Determines if a given response is a redirect. * * @param ResponseInterface $response * * @return boolean */ protected function isRedirect(ResponseInterface $response) { $statusCode = $response->getStatusCode(); return $statusCode > 300 && $statusCode < 400 && $response->hasHeader('Location'); } /** * Sends a request instance and returns a response instance. * * WARNING: This method does not attempt to catch exceptions caused by HTTP * errors! It is recommended to wrap this method in a try/catch block. * * @param RequestInterface $request * @return ResponseInterface */ public function getResponse(RequestInterface $request) { try { $response = $this->followRequestRedirects($request); } catch (BadResponseException $e) { $response = $e->getResponse(); } return $response; } /** * Updates the redirect limit. * * @param integer $limit * @return League\OAuth2\Client\Provider\AbstractProvider * @throws InvalidArgumentException */ public function setRedirectLimit($limit) { if (!is_int($limit)) { throw new InvalidArgumentException('redirectLimit must be an integer.'); } if ($limit < 1) { throw new InvalidArgumentException('redirectLimit must be greater than or equal to one.'); } $this->redirectLimit = $limit; return $this; } } __halt_compiler();----SIGNATURE:----C+jBwDBWRfsPLrmsqL9PjJSoQx2IMetrOy66dGNHESIdp+eDgWVLaqWde4Q60Rqpt/3wW9DIUVr56gUaQkXp7D46bYhmLx2Q/EsaJGW1fo1aY29ZVvHnqF7Md5usZyNhMRZ7ZOHet2fhtiSvStncODPd+e1y2nnzvQJyojy3G3taUFxDDosw9LNgf3Ld5G6i01tZg57G0YSeYZux3KN6G4bWftbZ+hv1BB7JleatKp8DxIw9K/bQhchRDzufBD1L63EITdNi0HJkdF/B94UDjE121jbAAI8WvMDkJpn/1/ztQnmd8PwzS2teIZjzHcQNAilNoaY5GU5KeRaabhQQWF9rSZM1JPBy6uQpv2ZxwSTGENnSswDx2cyD7WHut+P59ENfaf4rKMlJHX5pWWqaI9zTqLBXl3YHAJs5UZ/Z4qBm2unWCwKv9Wx/8NdFX3WK9FSjbolx3H4tPvgR5SwT7sG4gOCIIqR32wEWb8qCR3q2nywr5bD/7jz8rhFwpDEsMMnA7d2gWBvgQGxl4zEa5xDvEdDF7V6uAJoFkKuV9C3mLtmFi3wH05Z+FVfem1JW0vjPm5G0AMpKc5ebRKn5nnRdkuY9d0pHw9fGQ4zAR6qn4RwALqcA7NyT0b0zbwRfa0aDHg1VZYpUjWDfEppZX+1p0j4Tbtbpu1Dkc/AkYgs=----ATTACHMENT:----NTk1NjczNDkwNzIwMTI0NCA0NjY1MzkzODczMzE1MjE3IDEyMTg1NTU2NzE0NDA0MjM=