def authenticator(f):
    """A wrapper to allow developers to set a context creator that's appropriate
    for their particular API.
    """
    global authenticate_context
    authenticate_context = f
    return f
