private function AuthTokenProvider::tokenRenew in TMGMT Translator Smartling 8.2
Same name in this branch
- 8.2 api-sdk-php/src/AuthApi/AuthTokenProvider.php \Smartling\AuthApi\AuthTokenProvider::tokenRenew()
- 8.2 vendor/smartling/api-sdk-php/src/AuthApi/AuthTokenProvider.php \Smartling\AuthApi\AuthTokenProvider::tokenRenew()
Renews tokens
2 calls to AuthTokenProvider::tokenRenew()
- AuthTokenProvider::getAccessToken in api-sdk-php/
src/ AuthApi/ AuthTokenProvider.php - @inheritdoc
- AuthTokenProvider::getAccessToken in vendor/
smartling/ api-sdk-php/ src/ AuthApi/ AuthTokenProvider.php - @inheritdoc
File
- vendor/
smartling/ api-sdk-php/ src/ AuthApi/ AuthTokenProvider.php, line 142
Class
- AuthTokenProvider
- Class AuthTokenProvider @package Smartling\AuthApi
Namespace
Smartling\AuthApiCode
private function tokenRenew() {
if ($this
->tokenExists() && $this
->tokenCanBeRenewed()) {
$requestData = $this
->getDefaultRequestData('json', [
'refreshToken' => $this->data[self::RESPONSE_KEY_REFRESH_TOKEN],
], false);
return $this
->sendRequest('authenticate/refresh', $requestData, self::HTTP_METHOD_POST);
}
else {
return $this
->authenticate();
}
}