• Модуль: dav
  • Путь к файлу: ~/bitrix/modules/dav/lib/profile/response/token.php
  • Класс: BitrixDavProfileResponseToken
  • Вызов: Token::__construct
public function __construct()
{
	global $USER;
	$this->setUser($USER);
	$this->setHeader('Content-Type', 'application/json');
	if (!$this->isAccess())
	{
		$this->setStatus(403);
		$this->errors[] = 'Access denied for this user. User is not authorized in system';
		$this->setErrorBodyContent();
	}
	else
	{
		$body = ['token' => $this->getToken($this->getUser()->GetID())];
		$this->setBody(Json::encode($body));
	}

}