protected function processAuth(string $actionName, array $actionArgs): void
    {
        // Lambda
        $callAction = function (string $actionName, array $actionArgs) {
            if (empty($actionArgs)) {
                $this->ctrl->{$actionName}();
            } else {
                (new \ReflectionMethod($this->ctrl, $actionName))
                    ->invokeArgs($this->ctrl, $actionArgs);
            }
        };

        if (class_exists('\extensions\core\Auth')) {
            $auth = new \extensions\core\Auth($this->ctrl->getRequest());
            $auth->run();
            if ($auth->isValid()) {
                $callAction($actionName, $actionArgs);
            } else {
                $auth->onFail();
            }
        } else {
            $callAction($actionName, $actionArgs);
        }
    }