import base64


def decode_creds(authorization_token):
    """
    Decode Basic auth token into username, password.

    :param str authorization_token: Basic auth token
    :returns tuple: (username, password)
    """
    try:
        _, auth64 = authorization_token.split(' ')
        username, password = base64.b64decode(auth64).decode().split(':')
    except (AttributeError, ValueError):  # pragma: no cover
        username = password = None
    return (username, password)