solvebio/cli/auth.py
def interactive_login():
    """
    Force an interactive login via the command line.
    Sets the global API key and updates the client auth.
    """
    solvebio.access_token = None
    solvebio.api_key = None
    client.set_token()

    domain, email, password = _ask_for_credentials()
    if not all([domain, email, password]):
        print("Domain, email, and password are all required.")
        return

    try:
        response = client.post('/v1/auth/token', {
            'domain': domain.replace('.solvebio.com', ''),
            'email': email,
            'password': password
        })
    except SolveError as e:
        print('Login failed: {0}'.format(e))
    else:
        solvebio.api_key = response['token']
        client.set_token()
def interactive_login():
    """
    Force an interactive login via the command line.
    Sets the global API key and updates the client auth.
    """
    solvebio.access_token = None
    solvebio.api_key = None
    client.set_token()

    domain, email, password = _ask_for_credentials()
    if not all([domain, email, password]):
        print("Domain, email, and password are all required.")
        return

    try:
        response = client.post('/v1/auth/token', {
            'domain': domain.replace('.solvebio.com', ''),
            'email': email,
            'password': password
        })
    except SolveError as e:
        print('Login failed: {0}'.format(e))
    else:
        solvebio.api_key = response['token']
        client.set_token()
Force an interactive login via the command line.
    Sets the global API key and updates the client auth.