Mise à jour des librairies
This commit is contained in:
@@ -178,7 +178,7 @@ class Google_AccessToken_Verify
|
||||
{
|
||||
$certs = null;
|
||||
if ($cache = $this->getCache()) {
|
||||
$cacheItem = $cache->getItem('federated_signon_certs_v3', 3600);
|
||||
$cacheItem = $cache->getItem('federated_signon_certs_v3');
|
||||
$certs = $cacheItem->get();
|
||||
}
|
||||
|
||||
@@ -189,6 +189,7 @@ class Google_AccessToken_Verify
|
||||
);
|
||||
|
||||
if ($cache) {
|
||||
$cacheItem->expiresAt(new DateTime('+1 hour'));
|
||||
$cacheItem->set($certs);
|
||||
$cache->save($cacheItem);
|
||||
}
|
||||
@@ -210,8 +211,8 @@ class Google_AccessToken_Verify
|
||||
$jwtClass = 'Firebase\JWT\JWT';
|
||||
}
|
||||
|
||||
if (property_exists($jwtClass, 'leeway')) {
|
||||
// adds 1 second to JWT leeway
|
||||
if (property_exists($jwtClass, 'leeway') && $jwtClass::$leeway < 1) {
|
||||
// Ensures JWT leeway is at least 1
|
||||
// @see https://github.com/google/google-api-php-client/issues/827
|
||||
$jwtClass::$leeway = 1;
|
||||
}
|
||||
|
||||
22
vendor/google/apiclient/src/Google/Client.php
vendored
22
vendor/google/apiclient/src/Google/Client.php
vendored
@@ -25,7 +25,6 @@ use Google\Auth\Credentials\UserRefreshCredentials;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\ClientInterface;
|
||||
use GuzzleHttp\Ring\Client\StreamHandler;
|
||||
use GuzzleHttp\Psr7;
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
@@ -39,7 +38,7 @@ use Monolog\Handler\SyslogHandler as MonologSyslogHandler;
|
||||
*/
|
||||
class Google_Client
|
||||
{
|
||||
const LIBVER = "2.2.1";
|
||||
const LIBVER = "2.2.2";
|
||||
const USER_AGENT_SUFFIX = "google-api-php-client/";
|
||||
const OAUTH2_REVOKE_URI = 'https://accounts.google.com/o/oauth2/revoke';
|
||||
const OAUTH2_TOKEN_URI = 'https://www.googleapis.com/oauth2/v4/token';
|
||||
@@ -211,7 +210,7 @@ class Google_Client
|
||||
|
||||
/**
|
||||
* Fetches a fresh access token with a given assertion token.
|
||||
* @param $assertionCredentials optional.
|
||||
* @param ClientInterface $authHttp optional.
|
||||
* @return array access token
|
||||
*/
|
||||
public function fetchAccessTokenWithAssertion(ClientInterface $authHttp = null)
|
||||
@@ -441,11 +440,16 @@ class Google_Client
|
||||
return $this->token;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getRefreshToken()
|
||||
{
|
||||
if (isset($this->token['refresh_token'])) {
|
||||
return $this->token['refresh_token'];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -480,6 +484,9 @@ class Google_Client
|
||||
return ($created + ($this->token['expires_in'] - 30)) < time();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated See UPGRADING.md for more information
|
||||
*/
|
||||
public function getAuth()
|
||||
{
|
||||
throw new BadMethodCallException(
|
||||
@@ -487,6 +494,9 @@ class Google_Client
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated See UPGRADING.md for more information
|
||||
*/
|
||||
public function setAuth($auth)
|
||||
{
|
||||
throw new BadMethodCallException(
|
||||
@@ -753,7 +763,7 @@ class Google_Client
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return string|null
|
||||
* @visible For Testing
|
||||
*/
|
||||
public function prepareScopes()
|
||||
@@ -886,7 +896,7 @@ class Google_Client
|
||||
/**
|
||||
* Use when the service account has been delegated domain wide access.
|
||||
*
|
||||
* @param string subject an email address account to impersonate
|
||||
* @param string $subject an email address account to impersonate
|
||||
*/
|
||||
public function setSubject($subject)
|
||||
{
|
||||
@@ -968,7 +978,7 @@ class Google_Client
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Google\Auth\CacheInterface Cache implementation
|
||||
* @param array $cacheConfig
|
||||
*/
|
||||
public function setCacheConfig(array $cacheConfig)
|
||||
{
|
||||
|
||||
@@ -255,8 +255,14 @@ class Google_Service_Resource
|
||||
*/
|
||||
public function createRequestUri($restPath, $params)
|
||||
{
|
||||
// Override the default servicePath address if the $restPath use a /
|
||||
if ('/' == substr($restPath, 0, 1)) {
|
||||
$requestUrl = substr($restPath, 1);
|
||||
} else {
|
||||
$requestUrl = $this->servicePath . $restPath;
|
||||
}
|
||||
|
||||
// code for leading slash
|
||||
$requestUrl = $this->servicePath . $restPath;
|
||||
if ($this->rootUrl) {
|
||||
if ('/' !== substr($this->rootUrl, -1) && '/' !== substr($requestUrl, 0, 1)) {
|
||||
$requestUrl = '/' . $requestUrl;
|
||||
|
||||
Reference in New Issue
Block a user