Could you raise an exception if either neither or both authentication methods are provided to __init__? the top level Error exception should be fine to raise.