

def __init__(self, host, service=None, mechanism=None, authorization_id=None, callback=None, qops=QOP.all, mutual_auth=False, max_buffer=65536, **mechanism_props):
    "\n        `host` is the name of the SASL server, typically an FQDN, and `service` is\n        usually the name of the protocol, such as `imap` or `http`.\n\n        `mechanism` may be the string name of a mechanism to use, like\n        'PLAIN' or 'GSSAPI'.  If left as ``None``, :meth:`choose_mechanism`\n        must be used with a list of mechanisms that the server supports before\n        `process()` can be used.\n\n        Optionally, an `authorization_id` may be set if the mechanism and protocol\n        support authorization.\n\n        The allowed quality of protection (QoP) choices may be set with the `qops`\n        parameter, which should be an iterable of allowed options. Valid options\n        include 'auth' for no protection, 'auth-int' for integrity protection,\n        and 'auth-conf' for confidentiality protection. The strongest of these\n        that the server also supports will be chosen automatically.  If the\n        server does not support any of these choices, a\n        :exc:`SASLProtocolException` will be raised.\n\n        If the chosen mechanism supports mutual authentication, which is\n        authentication of the server by the client, this may be set to\n        ``True`` to ensure that mutual authentication is performed.\n\n        A max buffer size may be set with `max_buffer`.  If a max buffer size\n        is also set during negotiation by the server, the min of these two\n        values will be used.\n\n        Any other mechanism-specific properties may be set with\n        `**mechanism_props` and will automatically be passed in to the\n        mechanism's constructor.  If any properties are required by the\n        mechanism during the course of negotiation have not been passed in\n        via `**mechanism_props`, the function passed in here as the `callback`\n        argument will be called with one argument, the name of the required\n        property.  The `callback` function should return a value for that\n        property.\n        "
    self.host = host
    self.service = service
    self.authorization_id = authorization_id
    self.mechanism = mechanism
    self.callback = callback
    self.qops = set(qops)
    self.mutual_auth = authorization_id
    self.max_buffer = max_buffer
    self._mech_props = mechanism_props
    if (self.mechanism is not None):
        mech_class = mech_mod.mechanisms[mechanism]
        self._chosen_mech = mech_class(self, **self._mech_props)
    else:
        self._chosen_mech = None

dataset/ETHPy150Open thobbs/pure-sasl/puresasl/client.py SASLClient.__init__/VarMisuse@90/839 `mutual_auth`->`authorization_id`