use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
-use Friendica\Core\Authentication;
+use Friendica\App\Authentication;
use Friendica\Core\Config\Cache\ConfigCache;
use Friendica\Core\Config\Configuration;
use Friendica\Core\Config\PConfiguration;
use Friendica\Core\L10n\L10n;
+use Friendica\Core\Session;
use Friendica\Core\System;
use Friendica\Core\Theme;
use Friendica\Database\Database;
* @deprecated 2019.09 - Use BaseURL->remove() instead
* @see BaseURL::remove()
*/
- public function removeBaseURL($origURL)
+ public function removeBaseURL(string $origURL)
{
return $this->baseURL->remove($origURL);
}
* @param App\Module $module The determined module
* @param App\Router $router
* @param PConfiguration $pconfig
+ * @param Authentication $auth The Authentication backend of the node
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
- public function runFrontend(App\Module $module, App\Router $router, PConfiguration $pconfig)
+ public function runFrontend(App\Module $module, App\Router $router, PConfiguration $pconfig, Authentication $auth)
{
$moduleName = $module->getName();
System::externalRedirect($this->baseURL->get() . '/' . $this->args->getQueryString());
}
- Core\Session::init();
Core\Hook::callAll('init_1');
}
// Exclude the backend processes from the session management
- if (!$this->mode->isBackend()) {
- $stamp1 = microtime(true);
- session_start();
- $this->profiler->saveTimestamp($stamp1, 'parser', Core\System::callstack());
- $this->l10n->setSessionVariable();
- $this->l10n->setLangFromSession();
- } else {
- $_SESSION = [];
+ if ($this->mode->isBackend()) {
Core\Worker::executeIfIdle();
}
Model\Profile::openWebAuthInit($token);
}
- Authentication::sessionAuth();
+ $auth->withSession($this);
if (empty($_SESSION['authenticated'])) {
header('X-Account-Management-Status: none');