Defines controller of the login component.
977043
function LoginController($scope, $location, $http) {
    var urlParams = $location.search();

    Object.defineProperties(this, {

      /**
       * The URL of the service to redirect to.
       *
       * @property service
       * @type String
       */
      service: {
        value: urlParams.service,
        writable: true
      }

    });
  }
1144860
public function initialize(Controller $controller) {
		$this->_controller = $controller;
		if (!$this->_controller->Components->loaded('RequestHandler')) {
			$this->_controller->RequestHandler = $this->_controller->Components->load('RequestHandler');
			$this->_controller->RequestHandler->initialize($this->_controller);
		}
		if (!$this->_controller->Components->loaded('Session')) {
			$this->_controller->Session = $this->_controller->Components->load('Session');
			$this->_controller->Session->initialize($this->_controller);
		}
		if ($this->_controller->Auth->loggedIn() ||
			$this->_controller->RequestHandler->prefers('json')) {
			return;
		}

		$isAuthCfg = $this->_modelSetting->isAuthGroupConfigured();
		if ($isAuthCfg) {
			if ($this->_controller->Session->read('Settings.FirstLogon')) {
				$this->_controller->Session->delete('Settings.FirstLogon');

				return $this->_controller->redirect($this->_controller->Auth->logout());
			}

			return;
		}

		$pluginName = $this->_controller->request->param('plugin');
		$controllerName = $this->_controller->request->param('controller');
		$actionName = $this->_controller->request->param('action');
		if (($pluginName !== 'cake_settings_app') ||
			($controllerName !== 'settings') ||
			($actionName !== 'index')) {
			return;
		}

		$this->_controller->Auth->allow('index');
		$this->_controller->Session->write('Settings.FirstLogon', true);
	}
998402
protected function initSURole() : void
    {
        $this->stdout("Init SU role \n",  Console::FG_YELLOW);
        $this->authManager->removeAll();
        $su = $this->authManager->createRole(Rbac::R_SU);
        $su->description = 'Super User';
        $this->authManager->add($su);
    }
351014
public function startup($controller = null)
    {
        if (!$controller) {
            $controller = new Controller(new Request());
        }
        $registry = new ComponentRegistry();
        $this->Acl = new AclComponent($registry, Configure::read('Acl'));
        $this->Aco = $this->Acl->Aco;
        $this->controller = $controller;
        $this->_buildPrefixes();
        $this->_processIgnored();
    }
217053
public function handleRouter()
	{
		// Load initial/default routes if there're no components or the component wants to merge them
    	if ($this->component === false || $this->component->getMergeDefaultRouting()) {
    		$this->getRouter()->loadRoutes(
    			__APP_CONFIG_ROUTING,
				!$this->getSetting('forcelogin', true),
				$this->getSetting('forcesession', true),
				$this->getSetting('templatebase', true),
				$this->getSetting('templatepath', true)
			);
    	}

		// If there's a component
		if ($this->component !== false) {
			$this->getRouter()->loadRoutes(
				$this->component->hasRouting() ? $this->component->getRoutingPath() : __APP_CONFIG_ROUTING,
				!$this->getSetting('forcelogin'),
				$this->getSetting('forcesession'),
				$this->getSetting('templatebase'),
				$this->getSetting('templatepath')
			);
    	}
    	    	
    	$this->getRouter()->handleRoute(__BASE);
    }
245467
def controller(self):
        

        if hasattr(self, 'controller_id'):
            if len(self.controller_info['controllers']) > 1:
                raise TypeError(
                    'Only one controller per account is supported.'
                )
            return self.controller_id
        raise AttributeError('No controllers assigned to this account.')
745539
public function actionLogin()
	{
		$model=Yii::createComponent('gii.models.LoginForm');

		// collect user input data
		if(isset($_POST['LoginForm']))
		{
			$model->attributes=$_POST['LoginForm'];
			// validate user input and redirect to the previous page if valid
			if($model->validate() && $model->login())
				$this->redirect(array('index'));
		}
		// display the login form
		$this->render('login',array('model'=>$model));
	}
23090
public function loginpageAction()
    {
        $view = $this->forward()->dispatch('MelisCore\Controller\PluginView',
            [
                'action' => 'generate',
                'appconfigpath' => '/meliscore_login',
                'keyview' => 'meliscore_login',
            ]);

        $background = '';
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $appConfigForm = $melisMelisCoreConfig->getItem('/meliscore_login');
        if (!empty($appConfigForm['datas']['login_background'])) {
            $background = $appConfigForm['datas']['login_background'];
        }

        $schemeSvc = $this->getServiceLocator()->get('MelisCorePlatformSchemeService');
        $schemeData = $schemeSvc->getCurrentScheme();

        $bundleAsset = $this->getServiceLocator()->get('MelisAssetManagerWebPack')->getAssets();


        $this->layout()->addChild($view, 'content');

        $this->layout()->isLogin = 1;
        $this->layout()->login_background = $background;
        $this->layout()->schemes = $schemeData;
        $this->layout()->bundle = $bundleAsset;

        return $view;

    }
348176
public function initController(\OWeb\types\Controller $controller = null)
    {

        if ($this->controller == null)
            return;

        Events::getInstance()->sendEvent('Init_Prepare@OWeb\manage\Controller', $this->controller);

        $this->controller->initController();

        Events::getInstance()->sendEvent('Init_Done@OWeb\manage\Controller', $this->controller);

        Events::getInstance()->sendEvent('ActionDist_Prepare@OWeb\manage\Controller', $this->controller);

        //gestion des Actions...
        $source[] = \OWeb\OWeb::getInstance()->get_get();
        $source[] = \OWeb\OWeb::getInstance()->get_post();

        foreach ($source as $get) {
            if (isset($get['action']))
                $this->controller->doAction($get['action']);

            $i = 1;
            while (isset($get['action_' . $i])) {
                $this->controller->doAction($get['action_' . $i]);
                $i++;
            }
        }

        Events::getInstance()->sendEvent('ActionDist_Done@OWeb\manage\Controller', $this->controller);
    }
503100
def login_required(view):
    """"""

    @functools.wraps(view)
    def wrapped_view(**kwargs):
        if g.user is None:
            return redirect(url_for("auth.login"))

        return view(**kwargs)

    return wrapped_view
1119396
protected function start()
    {
        $controllerClass = $this->calculateControllerClassFromRights();
        $controller = $this->loadController($controllerClass); // try to instantiate the controller
        if (!$controller) {
            if ($this->logMissingPages) {
                $this->alert('Invalid controller ' . $controllerClass . '!');
            }
            return; // stop execution if it's  an invalid controller
        }
        $controller->setActiveAction($this->request()->getAction());
        if (!method_exists($controller, 'action' . ucfirst($controller->getActiveAction()))) { //check if action exists;
            if ($this->logMissingPages) {
                $this->alert('Action ' . $this->request()->getAction() . ' not found!', array(
                    'requestedController' => $this->request()->getController(),
                    'requestedModule' => $this->request()->getModule()
                ));
            }
            $controller = $this->loadController($this->getPageNotFound());
            if (!$controller) {
                $this->alert('Invalid controller ' . $controllerClass . '!');
                return; // stop execution if it's  an invalid controller
            }
        }

        $controller->setActiveAction($this->request()->getAction())->setRequest($this->request());

        if (!$controller->canRun()) {
            $controller = $this->loadController($this->getPageNotFound());
            if (!$controller) {
                $this->alert('Invalid controller ' . $controllerClass . '!');
                return; // stop execution if it's  an invalid controller
            }
            $controller->setActiveAction($this->request()->getAction())->setRequest($this->request());
        }

        $this->_controller = $controller;

        $path = dirname(dirname($this->autoload()->findFile(get_class($controller)))) . DIRECTORY_SEPARATOR;
        if ($path != $this->request()->getModulePath()) {
            $this->request()->setModulePath($path);
        }

        $controller->run();

    }
910847
protected function initializeControllerContext()
    {

        $request = new ActionRequest(Request::createFromEnvironment());
        $request->setDispatched(true);
        if (isset($this->flowHttpSettings['baseUri'])) {
            $request->getHttpRequest()->setBaseUri(new Uri($this->flowHttpSettings['baseUri']));
        }

        $response = new Response();

        $uriBuilder = new UriBuilder();
        $uriBuilder->setRequest($request);

        $arguments = new Arguments(array());

        $this->controllerContext = new ControllerContext($request, $response, $arguments, $uriBuilder);
    }
1218102
public void initialize(I_CmsSitemapController controller) {

        m_ownProperties = controller.replaceProperties(m_id, m_ownProperties);
        m_defaultFileProperties = controller.replaceProperties(m_defaultFileId, m_defaultFileProperties);
        controller.registerEntry(this);
    }
486725
public function onInvalidControl() {
		$auth=$this->_getAuthController();
		if(URequest::isAjax()){
			$this->jquery->get($auth->_getBaseRoute()."/noAccess/".implode(".", Startup::$urlParts),$auth->_getBodySelector(),["historize"=>false]);	
			echo $this->jquery->compile($this->view);
		}else{
			parent::initialize();
			$auth->noAccess(Startup::$urlParts);
			parent::finalize();
		}
		exit();
	}
1070858
public function onKernelController()
    {
        $themeContext = $this->container->get('theme.context.front');
        $themeContext->setCurrentTheme($this->getShopStorage()->getCurrentShop()->getTheme());
    }
901531
public function postLaunchAction()
    {
        $reflected = new \ReflectionClass($this->_controllerInstance);
        if ($reflected->hasMethod('postLaunchAction')) {
            call_user_func(array(
                $this->_controllerInstance,
                'postLaunchAction'
            ), null);
        }
    }
1112438
public ControllerRoute withBasicAuthentication(String username, String password) {
        Objects.requireNonNull(username, Required.USERNAME.toString());
        Objects.requireNonNull(password, Required.PASSWORD.toString());
        
        this.username = username;
        this.password = password;
        
        return this;
    }