You are here

private function AuthTokenProvider::authenticate in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/src/AuthApi/AuthTokenProvider.php \Smartling\AuthApi\AuthTokenProvider::authenticate()
  2. 8.2 api-sdk-php/src/AuthApi/AuthTokenProvider.php \Smartling\AuthApi\AuthTokenProvider::authenticate()
  3. 8.2 vendor/smartling/api-sdk-php/src/AuthApi/AuthTokenProvider.php \Smartling\AuthApi\AuthTokenProvider::authenticate()

Sends /authenticate request

2 calls to AuthTokenProvider::authenticate()
AuthTokenProvider::getAccessToken in vendor/smartling/api-sdk-php/src/AuthApi/AuthTokenProvider.php
@inheritdoc
AuthTokenProvider::refreshToken in vendor/smartling/api-sdk-php/src/AuthApi/AuthTokenProvider.php
Renews tokens

File

vendor/smartling/api-sdk-php/src/AuthApi/AuthTokenProvider.php, line 147

Class

AuthTokenProvider
Class AuthTokenProvider @package Smartling\AuthApi

Namespace

Smartling\AuthApi

Code

private function authenticate() {
  $this->requestTimestamp = time();
  $requestData = $this
    ->getDefaultRequestData('json', [
    'userIdentifier' => $this
      ->getUserIdentifier(),
    'userSecret' => $this
      ->getSecretKey(),
  ], false);
  return $this
    ->sendRequest('authenticate', $requestData, self::HTTP_METHOD_POST);
}