You are here

private function GoogleApiClient::setTokenCache in Google API PHP Client 8

Google Token Cache Setter.

Parameters

string $key: Cache ID.

array $value: Cache Value.

Return value

bool Status.

2 calls to GoogleApiClient::setTokenCache()
GoogleApiClient::getAccessTokenByAuthCode in src/Service/GoogleApiClient.php
Wrapper for Google_Client::fetchAccessTokenWithAuthCode.
GoogleApiClient::getAccessTokenWithRefreshToken in src/Service/GoogleApiClient.php
Wrapper for Google_Client::fetchAccessTokenWithRefreshToken.

File

src/Service/GoogleApiClient.php, line 156

Class

GoogleApiClient
Class Google API Client Service.

Namespace

Drupal\google_api_client\Service

Code

private function setTokenCache($key, array $value) {

  // Save the token.
  $this->configTokens
    ->set($key, serialize($value))
    ->save();
  return TRUE;
}