Initialize auth from HASS config.
517778
def auth_from_hass_config(path=None, **kwargs):
    """"""
    if path is None:
        path = config.find_hass_config()

    return Auth(os.path.join(path, ".storage/auth"), **kwargs)
790596
function init(config) {
    var promises = [];

    if (config.redis) {
        _.each(config.redis.dbs, function (idx, name) {
            promises.push(
                connectToRedis(idx, config.redis)
                    .then(function (remoteCache) {
                        caches[name] = wrapRemoteCache(remoteCache);
                        return true;
                    })
            );
        });
    }

    // initialization done once all connections established
    return Q.all(promises)
        .then(function () {
            return config;
        });
}
249025
def __init_configsvrs(self, params):
        """"""
        self._configsvrs = []
        for cfg in params:
            # Remove flags that turn on auth.
            cfg = self._strip_auth(cfg)
            server_id = cfg.pop('server_id', None)
            version = cfg.pop('version', self._version)
            cfg.update({'configsvr': True})
            if self.enable_ipv6:
                common.enable_ipv6_single(cfg)
            self._configsvrs.append(Servers().create(
                'mongod', cfg, sslParams=self.sslParams, autostart=True,
                version=version, server_id=server_id))
499204
def init(opts):
    '''
    
    '''
    try:
        DETAILS['server'] = SSHConnection(host=__opts__['proxy']['host'],
                                          username=__opts__['proxy']['username'],
                                          password=__opts__['proxy']['password'])
        out, err = DETAILS['server'].sendline('help')
        DETAILS['initialized'] = True

    except TerminalException as e:
        log.error(e)
        return False
1318697
public function init()
    {
        parent::init();

        $this->authManager = Instance::ensure($this->authManager, DbManager::className());
    }
618148
def step1(self, username, password):
        """"""
        self._check_initialized()
        context = AtvSRPContext(
            str(username), str(password),
            prime=constants.PRIME_2048,
            generator=constants.PRIME_2048_GEN)
        self.session = SRPClientSession(
            context, binascii.hexlify(self._auth_private).decode())
123199
async def setAuthAdmin(self, name, admin):
        '''
        
        '''
        item = self._getAuthItem(name)
        await item.setAdmin(admin)
367498
def authenticate(self, credentials):
        
        auth.authenticate(credentials, self)
        self.authset.add(credentials)
1006157
function DiscogsOAuth(auth){
	this.config = util.merge({}, defaultConfig);
	this.auth = {method: 'oauth', level: 0};
	if(auth && (typeof auth === 'object') && (auth.method === 'oauth')){
		util.merge(this.auth, auth);
	}
}
890884
public static function init() {

		self::$app = Kecik::getInstance();;

		self::$modelUser    = '\\Model\\' . self::$app->config->get( 'auth.model' );
		self::$postUsername = self::$app->config->get( 'auth.post_username' );
		self::$postPassword = self::$app->config->get( 'auth.post_password' );

		self::$fieldUsername   = self::$app->config->get( 'auth.field_username' );
		self::$fieldPassword   = self::$app->config->get( 'auth.field_password' );
		self::$fieldLevel      = self::$app->config->get( 'auth.field_level' );
		self::$loginRoute      = ( self::$app->config->get( 'auth.login_route' ) != '' ) ? self::$app->config->get( 'auth.login_route' ) : self::$loginRoute;
		self::$logoutRoute     = ( self::$app->config->get( 'auth.logout_route' ) != '' ) ? self::$app->config->get( 'auth.logout_route' ) : self::$logoutRoute;
		self::$loginTemplate   = ( self::$app->config->get( 'auth.login_template' ) != '' ) ? self::$app->config->get( 'auth.login_template' ) : self::$loginTemplate;
		self::$encryptFunction = ( self::$app->config->get( 'auth.encrypt_function' ) != '' ) ? self::$app->config->get( 'auth.encrypt_function' ) : self::$encryptFunction;

		if ( ! empty( self::username() ) ) {
			$model = self::$modelUser;
			$users = $model::find( [
				'where' => [
					[ self::$fieldUsername, '=', self::username() ]
				]
			] );

			if ( count( $users ) > 0 ) {
				self::$info = $users[0];
			}
		}

		AuthInit( self::$app );
	}
932898
def auth_as(self, user):
        """"""
        old_user = self._user
        self.auth(user)
        try:
            yield
        finally:
            self.auth(old_user)
58562
function initAuth (req, res, next) {
  const params = {
    session: false,
    state: state.serialize(req),
    scope: req.authProvider.scope
  };

  // noinspection JSUnresolvedFunction
  passport.authenticate(
    req.params.provider,
    params
  )(req, res, next);
}
661151
def __init(self):
        """"""
        res = self._get(url=self._url,
                           param_dict={"f": "json"},
                           securityHandler=self._securityHandler,
                           proxy_url=self._proxy_url,
                           proxy_port=self._proxy_port)
        self._json_dict = res
        self._json_string = json.dumps(self._json_dict)
        for k,v in self._json_dict.items():
            setattr(self, k, v)
1176862
def _init_associations(self, fin_anno):
        """"""
        ini = InitAssc(fin_anno, self.godag)
        # self.hdr = ini.flds
        self.id2gos = ini.id2gos
        return ini.nts
681703
public function init()
	{
		parent::init();
		if($this->authFile===null)
			$this->authFile=Yii::getPathOfAlias('application.data.auth').'.php';
		$this->load();
	}
71921
private function instantiateAuthentication()
    {
        foreach ((array) $this->getConfig('auth.bindings', []) as $binding) {
            $this->auths[] = $this->make($binding);
        }
    }
67511
def setup_auth(self):
        
        self.token = self.nb_record.token
        first = requests.get(f"{self.url}/login")
        self.xsrf_token = first.cookies.get("_xsrf", "")