- Модуль: rest
- Путь к файлу: ~/bitrix/modules/rest/classes/general/rest_util.php
- Класс: CRestUtil
- Вызов: CRestUtil::checkAuth
static function checkAuth($query, $scope, &$res)
{
// compatibility fix: other modules use checkAuth instead of /rest/download
if(!is_array($query))
{
$query = array('auth' => $query);
}
foreach(GetModuleEvents('rest', 'OnRestCheckAuth', true) as $eventHandler)
{
$eventResult = ExecuteModuleEventEx($eventHandler, array($query, $scope, &$res));
if($eventResult !== null)
{
return $eventResult;
}
}
$res = array(
"error" => "NO_AUTH_FOUND",
"error_description" => "Wrong authorization data",
);
return false;
}