ction. This may not succeed, so check :func:`~stem.socket.ControlSocket.is_alive` before using the socket further. If you use this function directly, rather than :func:`~stem.connection.authenticate`, we may mistakenly raise a :class:`~stem.connection.CookieAuthRejected` rather than :class:`~stem.connection.IncorrectCookieValue`. This is because we rely on tor's error messaging which is liable to change in future versions (:trac:`4817`). This can authenticate to either a :class:`~stem.control.BaseController` or :class:`~stem.socket.ControlSocket`. For general usage use the :func:`~stem.connection.authenticate` function instead. :param controller: tor controller or socket to be authenticated :param str cookie_path: path of the authentication cookie to send to tor :param bool suppress_ctl_errors: reports raised :class:`~stem.ControllerError` as authentication rejection if **True**, otherwise they're re-raised :raises: * :class:`stem.connection.IncorrectCookieSize` if the cookie file's size is wrong * :class:`stem.connection.UnreadableCookieFile` if the cookie file doesn't exist or we're unable to read it * :class:`stem.connection.CookieAuthRejected` if cookie authentication is attempted but the socket doesn't accept it * :class:`stem.connection.IncorrectCookieValue` if the cookie file's value is rejected FAUTHENTICATE %sr