import requests


def get_dnb_token(username, password, url="https://maxcvservices.dnb.com/rest/Authentication"):
    """Get a new authentication token.
 
    See http://developer.dnb.com/docs/2.0/common/authentication-process
 
    :param username: D&B username
    :type username: str
    :param password: D&B password
    :type password: str
    :returns: authentication token or "INVALID CREDENTIALS"
    :rtype: str
    """
    r = requests.post(
        url,
        headers={
            "x-dnb-user": username,
            "x-dnb-pwd": password,
        }
    )
    return r.headers["Authorization"]