• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_rest.php
  • Класс: CVoxImplantRestService
  • Вызов: CVoxImplantRestService::onAuthorizationError
static function onAuthorizationError($params, $n, $server)
{
	$allowedAuthTypes = [BitrixRestSessionAuthAuth::AUTH_TYPE => true];
	if (Loader::includeModule('im') && class_exists('BitrixImCallAuth'))
	{
		$allowedAuthTypes[BitrixImCallAuth::AUTH_TYPE] = true;
	}
	if (!isset($allowedAuthTypes[$server->getAuthType()]))
	{
		throw new BitrixRestRestException("This method is only available for internal usage.", "WRONG_AUTH_TYPE", CRestServer::STATUS_FORBIDDEN);
	}

	$voxMain = new CVoxImplantMain(static::getCurrentUserId());
	$voxMain->ClearUserInfo();
	$voxMain->ClearAccountInfo();
}