def authentication_validation(username, password, access_token):
    """
    Only accept one form of authentication.
    """
    if bool(username) is not bool(password):
        raise Exception(
            'Basic authentication requires a username AND password.')
    if username and access_token or password and access_token:
        raise Exception(
            'Cannot use both Basic Authentication and OAuth2.0. Please use only one authentication method.'
            )
