def allowed_mechs(self, mechs):
        """
        SASL mechanisms that are to be considered for authentication.

        This can be used on either the client or the server to restrict
        the SASL mechanisms that may be used to the mechanisms on the list.

        **NOTE:** By default the ``GSSAPI`` and ``GSS-SPNEGO`` mechanisms
        are not enabled for clients. This is because these mechanisms have
        the problematic behaviour of 'capturing' the client whenever they
        are installed so that they will be used by the client if offered by
        the server even if the client can't successfully authenticate this
        way. This can lead to some very hard to debug failures.

        **NOTE:** The ``GSSAPI`` or ``GSS-SPNEGO`` mechanisms need to be
        explicitly enabled if they are required (together with any other
        required mechanisms).

        :param mechs: A list of mechanisms that are allowed for authentication,
                      either a string containing a space-separated list of mechs
                      ``"mech1 mech2 ..."``, or a Python list of strings
                      ``["mech1", "mech2", ...]``.
        :type mechs: string
        """
        if isinstance(mechs, list):
            mechs = " ".join(mechs)
        pn_sasl_allowed_mechs(self._sasl, unicode2utf8(mechs))
Beispiel #2
0
 def allowed_mechs(self, mechs):
     if isinstance(mechs, list):
         mechs = " ".join(mechs)
     pn_sasl_allowed_mechs(self._sasl, unicode2utf8(mechs))
Beispiel #3
0
 def allowed_mechs(self, mechs):
     pn_sasl_allowed_mechs(self._sasl, unicode2utf8(mechs))
Beispiel #4
0
 def allowed_mechs(self, mechs):
     if isinstance(mechs, list):
         mechs = " ".join(mechs)
     pn_sasl_allowed_mechs(self._sasl, unicode2utf8(mechs))
Beispiel #5
0
 def allowed_mechs(self, mechs):
     pn_sasl_allowed_mechs(self._sasl, unicode2utf8(mechs))