import base64


def auth_for_user(user):
    """
    Formats the base64 string based on a user
    """
    return base64.standard_b64encode(
        "{}:{}".format(user.username, user.password).encode()
    )