• Модуль: socialservices
  • Путь к файлу: ~/bitrix/modules/socialservices/classes/general/google.php
  • Класс: CGoogleOAuthInterface
  • Вызов: CGoogleOAuthInterface::GetAppInfo
public function GetAppInfo()
{
	if ($this->idTokenAuth)
	{
		$identity = $this->decodeIdentityToken($this->idTokenAuth);
		if (empty($identity['aud']))
		{
			return false;
		}

		return [
			'id' => $identity['aud'],
		];
	}
	if ($this->access_token === false)
	{
		return false;
	}

	$result = $this->getDecodedJson(static::TOKENINFO_URL.'?access_token='.urlencode($this->access_token));

	if ($result && $result["audience"])
	{
		$result["id"] = $result["audience"];
	}

	return $result;
}