Initialization path
@param string $provider     The HybridAuth provider
@return void
187963
public function actionIndex($provider=NULL)
	{
        // Set the provider
        $this->setProvider($provider);

        if (isset($_GET['hauth_start']) || isset($_GET['hauth_done']))
            Hybrid_Endpoint::process();

        try {
		    $this->hybridAuth();
        } catch (Exception $e) {
            throw new CHttpException(400, $e->getMessage());
        }
	}
515176
public function provider( $provider ) {

		if ( is_string( $provider ) ) {
			$provider = $this->resolveProvider( $provider );
		}

		$this->providers[] = $provider;
	}
63347
private static function initialize()
    {
        if (self::$initialized) return;

        self::$client = \OpenId::getClient();
        self::$version = config('openid.api-version');
        self::$initialized = TRUE;
    }
33337
public function initialize()
    {
        if ($this->checkAuthentication()) {
            $data = $this->getAuthenticationData();
            if (!isset($data['user_id'])) {
                return false;
            }

            $user = $this->toolkit->getRepository($this->userClassName)->getById($data['user_id']);
            if (!$user) {
                $this->setAuthenticated(false);
                $this->setAuthenticationData([]);
                return false;
            }
            $this->setUser($user);
            return true;
        }
        return false;
    }
860246
public function init(): void
    {
        $this->setFormat(VisualizerTask::FORMAT_PNG);
        $this->setServer(VisualizerTask::SERVER);
        $this->checkHttpRequestLibrary();
        $this->checkPlantUmlLibrary();
        $this->checkXslExtension();
        $this->checkXmlExtension();
    }
396956
private function init(string $url): void
    {
        $this->resource = curl_init($url);

        curl_setopt($this->resource, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($this->resource, CURLOPT_CONNECTTIMEOUT, $this->loader->getTimeout());
        curl_setopt($this->resource, CURLOPT_USERAGENT, $this->loader->getUserAgent());
        curl_setopt($this->resource, CURLOPT_HEADER, true);
        curl_setopt($this->resource, CURLINFO_HEADER_OUT, true);

        // check and set proxy settings
        $proxy_host = $this->loader->getOption('ProxyHost');

        if (null !== $proxy_host) {
            // check for supported protocol
            $proxy_protocol = $this->loader->getOption('ProxyProtocol');

            if (null !== $proxy_protocol) {
                $allowedProtocolls = [StreamCreator::PROXY_PROTOCOL_HTTP, StreamCreator::PROXY_PROTOCOL_HTTPS];

                if (!in_array($proxy_protocol, $allowedProtocolls)) {
                    throw new Exception(
                        'Invalid/unsupported value "' . $proxy_protocol . '" for option "ProxyProtocol".',
                        Exception::INVALID_OPTION
                    );
                }
            } else {
                $proxy_protocol = StreamCreator::PROXY_PROTOCOL_HTTP;
            }

            $proxy_port = $this->loader->getOption('ProxyPort');

            // set basic proxy options
            curl_setopt($this->resource, CURLOPT_PROXY, $proxy_protocol . '://' . $proxy_host);
            if (null !== $proxy_port) {
                curl_setopt($this->resource, CURLOPT_PROXYPORT, $proxy_port);
            }

            // check auth settings
            $proxy_user = $this->loader->getOption('ProxyUser');

            // set proxy auth options
            if (null !== $proxy_user) {
                $proxy_password = $this->loader->getOption('ProxyPassword');

                $proxy_auth = $this->loader->getOption('ProxyAuth');
                if (null !== $proxy_auth) {
                    $allowedAuth = [StreamCreator::PROXY_AUTH_BASIC, StreamCreator::PROXY_AUTH_NTLM];

                    if (!in_array($proxy_auth, $allowedAuth)) {
                        throw new Exception(
                            'Invalid/unsupported value "' . $proxy_auth . '" for option "ProxyAuth".',
                            Exception::INVALID_OPTION
                        );
                    }
                } else {
                    $proxy_auth = StreamCreator::PROXY_AUTH_BASIC;
                }

                if (StreamCreator::PROXY_AUTH_NTLM === $proxy_auth) {
                    curl_setopt($this->resource, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
                }
                curl_setopt($this->resource, CURLOPT_PROXYUSERPWD, $proxy_user . ':' . $proxy_password);
            }
        }
    }
491182
public function initialize ($routepath)
    {
        // Set path
        $this->routepath = $routepath;

        // Add templates
        Template::addPath (__DIR__ . '/templates/', 'CatLab/Accounts/');

        // Add locales
        Text::getInstance ()->addPath ('catlab.accounts', __DIR__ . '/locales/');

        // Set session variable
        Application::getInstance ()->on ('dispatch:before', array ($this, 'setRequestUser'));

        // Set the global user mapper, unless one is set already
        Application::getInstance ()->on ('dispatch:first', array ($this, 'setUserMapper'));

        // Add helper methods
        $helper = new LoginForm ($this);

        Template::addHelper ('CatLab.Accounts.LoginForm', $helper);
    }
1326235
private static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$serverName = (string)$baseClass->getServerName();
            static::$refererIntegrityEnabled = (bool)$baseClass->Session->RefererIntegrity->enabled;
            static::$tokenIntegrityEnabled = (bool)$baseClass->Session->TokenIntegrity->enabled;
            static::$tokenUseLooseIP = (bool)$baseClass->Session->TokenIntegrity->useLooseIP;
            static::$tokenUseHttpUserAgent = (bool)$baseClass->Session->TokenIntegrity->useHttpUserAgent;
            static::$tokenUseHttpAccept = (bool)$baseClass->Session->TokenIntegrity->useHttpAccept;
            static::$tokenUseHttpAcceptCharset = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptCharset;
            static::$tokenUseHttpAcceptEncoding = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptEncoding;
            static::$tokenUseHttpAcceptLanguage = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptLanguage;
        }
    }
729705
private function initHttp()
    {
        $this->di->mapService('core.http', '\Core\Http\Http', [
            'core.http.cookie',
            'core.http.header'
        ]);
        $this->di->mapService('core.http.cookie', '\Core\Http\Cookie\CookieHandler');
        $this->di->mapService('core.http.header', '\Core\Http\Header\HeaderHandler');

        $this->http = $this->di->get('core.http');
    }
209225
public function initialization(&$context)
    {
        $this->setContext($context);
        $this->redis = $this->loader->redis("redisPool",$this);
        $this->db = $this->loader->mysql("mysqlPool",$this);
    }
1291722
public function setProvider($provider=NULL)
    {
        // Prevent the provider from being NULL
        if ($provider == NULL)
            throw new CException(Yii::t('Hybridauth.main', "You haven't supplied a provider"));

        // Set the property
        $this->_provider = $provider;

        return $this->_provider;
    }
1294253
public function init()
    {
        parent::init();

        $this->regexp = new Regexp();

        $this->authScheme = HTTP_Request2::AUTH_BASIC;

        // Other dependencies that should only be loaded when class is actually used
        include_once 'HTTP/Request2/Observer/Log.php';
    }
786094
static function init()
    {
		session_write_close();
        if (IS_INSTALL){
            session_id(Auth::get_user()->value(null, true));
        }else{
            session_id('install');
        }
		session_start();
	}
73839
protected function _init(Request $request)
    {
        if ($this->_initDone) {
            return;
        }

        $this->_userModel = TableRegistry::get($this->_config['userModel']);
        $this->_profileModel = TableRegistry::get($this->_config['profileModel']);

        $request->session()->start();

        $hybridConfig = Configure::read('HybridAuth');

        if (empty($hybridConfig['base_url'])) {
            $hybridConfig['base_url'] = [
                'plugin' => 'ADmad/HybridAuth',
                'controller' => 'HybridAuth',
                'action' => 'endpoint',
                'prefix' => false
            ];
        }

        $hybridConfig['base_url'] = $this->_appendRedirectQueryString(
            $hybridConfig['base_url'],
            $request->query(static::QUERY_STRING_REDIRECT)
        );

        $hybridConfig['base_url'] = Router::url($hybridConfig['base_url'], true);

        try {
            Hybrid_Auth::initialize($hybridConfig);
        } catch (\Exception $e) {
            if ($e->getCode() < 5) {
                throw new \RuntimeException($e->getMessage());
            } else {
                $this->_registry->Auth->flash($e->getMessage());
                Hybrid_Auth::initialize($hybridConfig);
            }
        }
    }
1181852
private function initialize()
    {
        if ($this->initialized) {
            return;
        }

        if ($this->session->isStarted() && $this->session->get('stack') !== null) {
            $paths = $this->session->get('stack');
            $this->files = $this->hydrateList($paths);
        } else {
            $paths = $this->users->getCurrentUser()['stack'];
            $this->files = $this->hydrateList($paths);
            $this->session->set('stack', $this->persistableList());
        }

        $this->initialized = true;
    }
960809
public function register($provider)
    {
        // When we receive a string we consider it to be a provider, if not we throw them away!
        if (is_string($provider) && !is_a($provider, '\Vinelab\Minion\Provider', true)) {
            throw new InvalidProviderException(
                sprintf('Provider %s must be an instance of \Vinelab\Minion\Provider', $provider)
            );
        }

        if (!in_array($provider, $this->providers)) {
            $this->providers[] = $provider;
        }
    }
1051478
public function init( $config = NULL )
    {
        $path = '';

        if ( is_array( $config ) )
        {
            foreach ( $config as $key => $value )
            {
                switch ( $key )
                {
                    case 'handler':
                        if ( 'file' === $value )
                        {
                            $this->handler = new FileHandler();
                        }
                        elseif ( 'php' === $value )
                        {
                            $this->handler = new PHPHandler();
                        }
                        break;

                    case 'strict':
                        $this->handler->setStrict( $value );
                        break;

                    case 'session_path':
                        $path = $value;
                        break;

                    case 'session_id':
                        $this->handler->setSessionID( $value );
                        break;

                    default:
                        // Do nothing
                        break;
                }
            }
        }

        if ( NULL !== $this->handler )
        {
            $this->handler->create( $path );
        }
        else
        {
            throw new InvalidSessionException( 'Session has no valid handler.' );
        }
    }