Login to MediaFire account.

        Keyword arguments:
        email -- account email
        password -- account password
        app_id -- application ID
        api_key -- API Key (optional)
326864
def login(self, email=None, password=None, app_id=None, api_key=None):
        
        session_token = self.api.user_get_session_token(
            app_id=app_id, email=email, password=password, api_key=api_key)

        # install session token back into api client
        self.api.session = session_token
377219
def login(self, username, password):
        
        # we could get stuck in an inconsistent state if got an exception while
        # trying to login with different credentials than what is stored so
        # we rollback the state to prevent that
        state_snapshot = self._state.copy()
        try:
            self._ajax_api.User_Login(name=username, password=password)
            self._android_api.login(account=username, password=password)
            self._manga_api.cr_login(account=username, password=password)
        except Exception as err:
            # something went wrong, rollback
            self._state = state_snapshot
            raise err
        self._state['username'] = username
        self._state['password'] = password
        return self.logged_in
1164202
def login(self, **kwargs):
        
        assert self.LOGIN_URL_PATH is not None

        render_name = kwargs.pop("render", "json")
        render = get_renderer(render_name)
        params = parse_args(**kwargs)
        return self.post(self.LOGIN_URL_PATH, body_params=params, render=render)
677217
def cli(obj, name, email, password, status, text):
    """"""
    client = obj['client']
    if not email:
        raise click.UsageError('Need "--email" to sign-up new user.')
    if not password:
        raise click.UsageError('Need "--password" to sign-up new user.')
    try:
        r = client.signup(name=name, email=email, password=password, status=status, attributes=None, text=text)
    except Exception as e:
        click.echo('ERROR: {}'.format(e))
        sys.exit(1)
    if 'token' in r:
        click.echo('Signed Up.')
    else:
        raise AuthError
1136789
def create_account(self, email, password=None, attrs={}):
        
        attrs = [{'n': k, '_content': v} for k, v in attrs.items()]

        params = {'name': email, 'a': attrs}

        if password:
            params['password'] = password

        resp = self.request_single('CreateAccount', params)

        return zobjects.Account.from_dict(resp)
1044262
def create_credentials(credentials_file=None,
                       service_email=None,
                       service_key=None,
                       scope='https://www.googleapis.com/auth/androidpublisher'):
    
    credentials = None
    if service_email is None and service_key is None:
        print(credentials_file)
        if credentials_file is None:
            # try load file from env
            key = 'PLAY_DELIVER_CREDENTIALS'
            if key in os.environ:
                credentials_file = os.environ[key]

        if credentials_file is None:
            # try to find the file in home
            path = os.path.expanduser('~/.playdeliver/credentials.json')
            if os.path.exists(path):
                credentials_file = path

        if credentials_file is not None:
            credentials = client.GoogleCredentials.from_stream(
                credentials_file)
            credentials = credentials.create_scoped(scope)
        else:
            sys.exit("no credentials")
    else:
        credentials = client.SignedJwtAssertionCredentials(
            service_email, _load_key(service_key), scope=scope)
    return credentials
563376
def login(self, identity, credentials):
        '''
        '''
        result = self.dispatcher.session.post(self._url('v0/auth/login'),
                                              json={
                                                  'email': identity,
                                                  'password': credentials
                                              })
        status = result.status_code
        if status == 400:
            raise APIException('invalid parameters, login process has changed')
        elif status == 401:
            # do our best to get something out to the user
            msg = result.text
            try:
                msg = json.loads(result.text)['message']
            finally:
                raise InvalidIdentity(msg)
        elif status != 200:
            raise APIException('%s: %s' % (status, result.text))
        jwt = result.text
        payload = jwt.split('.')[1]
        rem = len(payload) % 4
        if rem > 0:
            payload += '=' * (4 - rem)
        payload = base64.urlsafe_b64decode(payload.encode('utf-8'))
        return json.loads(payload.decode('utf-8'))
290241
def agents_email_show(self, email_id, **kwargs):
        ""
        api_path = "/api/v2/agents/email/{email_id}"
        api_path = api_path.format(email_id=email_id)
        return self.call(api_path, **kwargs)
1367709
def auth_token(self, apikey=None, secret=None, email=None, password=None):
        
        if (apikey and secret) or (self._apikey and self._secret):
            body = {
                "key_id": apikey or self._apikey,
                "secret": secret or self._secret
            }
        elif (email and password) or (self._email and self._password):
            body = {
                "user" : email or self._email,
                "password" : password or self._password
            }
        else:
            raise Value("No authentication provided.")
        response = self._post(url.auth, body=body)

        self._check_response(response, 200)
        return self._create_response(response).get("jwt")
681981
def login(self, login_type, **kwargs):
        
        content = {
            "type": login_type
        }
        for key in kwargs:
            if kwargs[key]:
                content[key] = kwargs[key]

        return self._send("POST", "/login", content)
621205
def _auth(self):
        
        codec = PbufCodec()
        username = self._client._credentials.username
        password = self._client._credentials.password
        if not password:
            password = ''
        msg = codec.encode_auth(username, password)
        resp_code, _ = self._non_connect_send_recv_msg(msg)
        if resp_code == riak.pb.messages.MSG_CODE_AUTH_RESP:
            return True
        else:
            return False
693017
public static Observable<BackendUser> signInInBackground(String email, String password){
        return getAM().loginASync(new LoginCredentials(email, password));
    }
126082
def login(options = {})
      body = { 
        body: {
          username: options[:username],
          password: options[:password],
          account_id: options[:account_id]
        }
      }
      self.class.post("/#{@api_ver}/auth/login", body)
    end
899041
function(providerId, opt_email) {
    // If popup flow enabled, this will fail and fallback to redirect.
    // TODO: Optimize to force redirect mode only.
    // For non-Google providers (not supported yet). This may end up signing the
    // user with a provider using different email. Even for Google, a user can
    // override the login_hint, but that should be fine as it is the user's
    // choice.
    firebaseui.auth.widget.handler.common.federatedSignIn(
        app, component, providerId, opt_email);
    return goog.Promise.resolve(true);
  }
730115
def login(self, username, password, email, url, config_path):
        
        if username and password:
            try:
                self.client.login(username=username, password=password, email=email,
                                  registry=url, reauth=True)
            except docker_errors.APIError as exc:
                raise exceptions.AnsibleContainerConductorException(
                    u"Error logging into registry: {}".format(exc)
                )
            except Exception:
                raise

            self._update_config_file(username, password, email, url, config_path)

        username, password = self._get_registry_auth(url, config_path)
        if not username:
            raise exceptions.AnsibleContainerConductorException(
                u'Please provide login credentials for registry {}.'.format(url))
        return username, password
1037794
def _login(self, user='', password=''):
        

        logger.debug("ZabbixAPI.login({0},{1})".format(user, password))

        self.auth = None

        if self.use_authenticate:
            self.auth = self.user.authenticate(user=user, password=password)
        else:
            self.auth = self.user.login(user=user, password=password)
1082588
def _login(self):
        '''
        '''
        server, port, mode, debug = self.connection_details

        if mode == 'SSL':
            smtp_class = smtplib.SMTP_SSL
        else:
            smtp_class = smtplib.SMTP

        smtp = smtp_class(server, port)
        smtp.set_debuglevel(debug)

        if mode == 'TLS':
            smtp.starttls()

        self.authenticate(smtp)

        return smtp