• Модуль: socialservices
  • Путь к файлу: ~/bitrix/modules/socialservices/classes/general/googleproxy.php
  • Класс: CSocServGoogleProxyOAuth
  • Вызов: CSocServGoogleProxyOAuth::generateUserToken
private function generateUserToken(): string
{
	$configuration = Configuration::getInstance();
	$cipherKey = $configuration->get('crypto')['crypto_key'] ?? null;
	if (!$cipherKey)
	{
		throw new SystemException('There is no crypto[crypto_key] in .settings.php. Generate it.');
	}

	$cipher = new Cipher();

	return base64_encode($cipher->encrypt(time() . '_'. $this->userId .'_' . self::PROXY_CONST, $cipherKey));
}