Parameters:
     - login
     - tserver
193851
def getActiveScans(self, login, tserver):
    
    self.send_getActiveScans(login, tserver)
    return self.recv_getActiveScans()
581449
def login_handler(self, config=None, prefix=None, **args):
        
        headers = {}
        headers['Access-control-allow-origin'] = '*'
        headers['Content-type'] = 'text/html'
        auth = request.authorization
        if (auth and auth.username == auth.password):
            return self.set_cookie_close_window_response(
                "valid-http-basic-login")
        else:
            headers['WWW-Authenticate'] = (
                'Basic realm="HTTP-Basic-Auth at %s (u=p to login)"' %
                (self.name))
            return make_response("", 401, headers)
796239
def _login(self, username, password):
        '''
        '''
        logger.debug('login in as user "%s"' % username)
        url = self._build_url('/auth')
        payload = {'username': username, 'password': password}
        res = self._session.post(url, json=payload)
        res.raise_for_status()
        self._access_token = res.json()['access_token']
        self._session.headers.update(
            {'Authorization': 'JWT %s' % self._access_token}
        )
231818
def _make_login(self):
        
        login_url = '{}data/v1/session/login?user={}&pass={}&sid={}'.format(self.base_url, self.username, self.password,
                                                                            self._parse_session_id(self._session_info))
        self._session_info = get_json(login_url)
1051222
def logon(self, password='admin'):
        
        r = self._basic_post(url='logon', data=password)
        return r.json()
179402
private function toServerLogin()
	{
		$loginUrl = $this->_config['loginView'].$this->signature().'&appId='.$this->_config['appId'].'&callback='.$this->_callback;
		header('Location:'.$loginUrl);
	}
608978
def telnet_login(
        self,
        pri_prompt_terminator="#",
        alt_prompt_terminator=">",
        username_pattern=r"Login Name:",
        pwd_pattern=r"assword",
        delay_factor=1,
        max_loops=60,
    ):
        """"""
        super(HPProcurveTelnet, self).telnet_login(
            pri_prompt_terminator=pri_prompt_terminator,
            alt_prompt_terminator=alt_prompt_terminator,
            username_pattern=username_pattern,
            pwd_pattern=pwd_pattern,
            delay_factor=delay_factor,
            max_loops=max_loops,
        )
576923
def _handle_login(opt, action, bz):
    
    is_login_command = (action == 'login')

    do_interactive_login = (is_login_command or
        opt.login or opt.username or opt.password)
    username = getattr(opt, "pos_username", None) or opt.username
    password = getattr(opt, "pos_password", None) or opt.password

    try:
        if do_interactive_login:
            if bz.url:
                print("Logging into %s" % urlparse(bz.url)[1])
            bz.interactive_login(username, password,
                    restrict_login=opt.restrict_login)
    except bugzilla.BugzillaError as e:
        print(str(e))
        sys.exit(1)

    if opt.ensure_logged_in and not bz.logged_in:
        print("--ensure-logged-in passed but you aren't logged in to %s" %
            bz.url)
        sys.exit(1)

    if is_login_command:
        msg = "Login successful."
        if bz.cookiefile or bz.tokenfile:
            msg = "Login successful, token cache updated."

        print(msg)
        sys.exit(0)
1257403
def _login(self, username, password, client_id, client_secret):
        """"""
        url = self.api_url + self.auth_token_url
        auth_string = '%s:%s' % (client_id, client_secret)
        authorization = base64.b64encode(auth_string.encode()).decode()
        headers = {
            'Authorization': "Basic " + authorization,
            'Content-Type': "application/x-www-form-urlencoded"
        }
        params = {
            'username': str(username),
            'password': str(password),
            # 'client_id': client_id,
            'grant_type': 'password',
            'response_type': 'token'
        }
        return self.session.post(url, params=params, headers=headers)
1351909
def login(self, username, password):
        
        d = self.send_command('login', keys={'client_login_name': username, 'client_login_password': password})
        if d == 0:
            self._log.info('Login Successful')
            return True
        return False
372760
def user_loggedin(sender, **kwargs):
    
    values = {
        'value': 1,
        'path': kwargs['request'].path,
        'user_id': str(kwargs['user'].pk),
        'username': kwargs['user'].username,
    }
    write('user_logins', values=values)
1115180
def login(request):
    '''
    
    '''
    serializer_class = registration_settings.LOGIN_SERIALIZER_CLASS
    serializer = serializer_class(data=request.data)
    serializer.is_valid(raise_exception=True)
    user = serializer.get_authenticated_user()

    if not user:
        raise BadRequest('Login or password invalid.')

    extra_data = perform_login(request, user)

    return get_ok_response('Login successful', extra_data=extra_data)
1333655
def login(self, email=None, password=None):
        """"""
        auth_url = self.url('auth')
        email = email or self._config.get('email')
        password = password or self._config.get('password')
        if password and not email:
            raise Exception('Email must be provided when password is.')
        while True:
            if not email:
                sys.stdout.write('Email: ')
                sys.stdout.flush()
                email = sys.stdin.readline().strip()
                if not email:
                    print('Goodbye!')
                    sys.exit(1)
            if not password:
                password = getpass.getpass('Password for {0}: '.format(email))
            response = self.request(auth_url, 'PUT', email=email,
                                    password=password)
            if response.status_code == 201:
                print('logged in as {0}'.format(email))
                self.save_prompt(email, password)
                self.email = email
                break
            else:
                print(response.json()['messages'])
                email = password = None
699531
def login(self, schema, username, password):
        
        self.schema = schema
        self.username = username
        self.password = password
        self.connection = schema
1040914
def login(self):
        
        auth_data = dict()
        auth_data['apikey'] = self.api_key
        auth_data['username'] = self.username
        auth_data['userkey'] = self.account_identifier

        auth_resp = requests_util.run_request('post', self.API_BASE_URL + '/login', data=json.dumps(auth_data),
                                              headers=self.__get_header())

        if auth_resp.status_code == 200:
            auth_resp_data = self.parse_raw_response(auth_resp)
            self.__token = auth_resp_data['token']
            self.__auth_time = datetime.now()
            self.is_authenticated = True
        else:
            raise AuthenticationFailedException('Authentication failed!')
137399
@SuppressWarnings({ "rawtypes", "unchecked" })
    public int login(Task task, String strUserName, String strPassword, String strDomain)
    {
        boolean bCreateServer = false;
        if ((this.getProperty(Params.REMOTE_HOST) != null) && (this.getProperty(Params.REMOTE_HOST).length() > 0))
            bCreateServer = true;
        org.jbundle.thin.base.remote.RemoteTask remoteTask = (org.jbundle.thin.base.remote.RemoteTask)this.getRemoteTask(null, strUserName, bCreateServer);
        if (remoteTask == null)
        {
            if (task != null)
                return task.setLastError(this.getResources("Error", true).getString("User remote session does not exist"));
            return Constants.ERROR_RETURN;
        }
        try {
            Map<String,Object> mapLoginInfo = remoteTask.login(strUserName, strPassword, strDomain);
            String strSecurityMap = (String)mapLoginInfo.get(Params.SECURITY_MAP);
            Map<String,Object> mapReturnParams = (Map)mapLoginInfo.get(Params.USER_PROPERTIES);      

            if (this.getSystemRecordOwner() != null)
                this.getSystemRecordOwner().setProperties(mapReturnParams); // Thick implementation
            else
            {
                if (this.getProperties() == null)
                    this.setProperties(mapReturnParams);    // Thin implementation
                else
                    this.getProperties().putAll(mapReturnParams);
            }
            if (Util.isNumeric(strUserName))
                strUserName = null;
            if (mapReturnParams.get(Params.USER_NAME) != null)
                strUserName = (String)mapReturnParams.get(Params.USER_NAME);
            this.setProperty(Params.USER_NAME, strUserName);
            this.setProperty(Params.USER_ID, (String)mapReturnParams.get(Params.USER_ID));
            this.setProperty(Params.AUTH_TOKEN, (String)mapReturnParams.get(Params.AUTH_TOKEN)); // Save the remote authorization token
            this.setProperty(Params.CONTACT_ID, (String)mapReturnParams.get(Params.CONTACT_ID));
            this.setProperty(Params.CONTACT_TYPE, (String)mapReturnParams.get(Params.CONTACT_TYPE)); // Save the remote authorization token
            
            this.setProperty(Params.SECURITY_MAP, strSecurityMap);
            this.setProperty(Params.SECURITY_LEVEL, ((strPassword == null) || (strPassword.length() == 0)) ? Integer.toString(Constants.LOGIN_USER) : Integer.toString(Constants.LOGIN_AUTHENTICATED));
            if (("1"/*DBConstants.ANON_USER_ID*/.equals(this.getProperty(Params.USER_ID)))
                    || (this.getProperty(Params.USER_ID) == null))
                this.setProperty(Params.SECURITY_LEVEL, Integer.toString(Constants.LOGIN_USER));   // Special case - If user is anonymous, level is always anonymous
            
            return Constants.NORMAL_RETURN;
        } catch (RemoteException ex) {
            if (task != null)
            {
            	String message = ex.getMessage();
            	if (ex.getCause() != null)
            		message = ex.getCause().getMessage();
                return task.setLastError(message);
            }
            return Constants.ERROR_RETURN;            
        }
    }
1359908
def login(self, login, password):
        
        self.client.read_until('Username: ')
        self.client.write(login + '\r\n')
        self.client.read_until('Password: ')
        self.client.write(password + '\r\n')
        current_data = self.client.read_until('$ ', 10)
        if not current_data.endswith('$ '):
            raise InvalidLogin