def check_credentials(credentials_id, credentials_key, request):
    """ Retrieve credentials and check value of secret key.
    (Used by BasicAuth policy).
    """
    try:
        _, stored_key = get_credentials(request, credentials_id)
        if stored_key == credentials_key:
            return [credentials_id]
    except __HOLE__:
        pass
    request.principals = [Everyone]
    return []
dataset/ETHPy150Open spiral-project/daybed/daybed/permissions.py/check_credentials