Commit 98bf506a authored by Kenneth Giusti's avatar Kenneth Giusti

bugfix: allow PLAIN or ANONYMOUS authentication in server mode

parent 243328f4
......@@ -23,4 +23,4 @@ from pyngus.link import SenderLink, SenderEventHandler
from pyngus.sockets import read_socket_input
from pyngus.sockets import write_socket_output
VERSION = (2, 0, 1) # major, minor, fix
VERSION = (2, 0, 2) # major, minor, fix
......@@ -270,14 +270,14 @@ class Connection(Endpoint):
if mechs:
self.pn_sasl.mechanisms(mechs)
else:
# new Proton SASL configuration
# new Proton SASL configuration:
# maintain old behavior: allow PLAIN and ANONYMOUS
# authentication. Override this using x-sasl-mechs below:
self.pn_sasl.allow_insecure_mechs = True
if 'x-require-auth' in self._properties:
ra = self._properties['x-require-auth']
self._pn_transport.require_auth(ra)
if 'x-username' in self._properties:
# maintain old behavior: allow PLAIN and ANONYMOUS
# authentication. Override this using x-sasl-mechs below:
self.pn_sasl.allow_insecure_mechs = True
self._pn_connection.user = self._properties['x-username']
if 'x-password' in self._properties:
self._pn_connection.password = \
......
......@@ -19,7 +19,7 @@
from setuptools import setup
_VERSION = "2.0.1" # NOTE: update __init__.py too!
_VERSION = "2.0.2" # NOTE: update __init__.py too!
# I hack, therefore I am (productive) Some distros (which will not be named)
# don't use setup.py to install the proton python module. In this case, pip
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment