Repository: qpid-proton Updated Branches: refs/heads/master 1d9eb12a8 -> 78b4873f5
PROTON-334: Added in missing python SASL object level bindings - Fixed an obsolete transport API comment Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/78b4873f Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/78b4873f Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/78b4873f Branch: refs/heads/master Commit: 78b4873f50e5c98c40e43b87933960e176df63e5 Parents: a9468f6 Author: Andrew Stitcher <astitc...@apache.org> Authored: Tue Jun 2 14:47:07 2015 -0400 Committer: Andrew Stitcher <astitc...@apache.org> Committed: Tue Jun 2 14:58:22 2015 -0400 ---------------------------------------------------------------------- proton-c/bindings/python/proton/__init__.py | 20 ++++++++++++++++++++ proton-c/include/proton/transport.h | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/78b4873f/proton-c/bindings/python/proton/__init__.py ---------------------------------------------------------------------- diff --git a/proton-c/bindings/python/proton/__init__.py b/proton-c/bindings/python/proton/__init__.py index a4e01f8..5de9510 100644 --- a/proton-c/bindings/python/proton/__init__.py +++ b/proton-c/bindings/python/proton/__init__.py @@ -3219,6 +3219,10 @@ A callback for trace logging. The callback is passed the transport and log messa def encrypted(self): return pn_transport_is_encrypted(self._impl) + @property + def user(self): + return pn_transport_get_user(self._impl) + def bind(self, connection): """Assign a connection to the transport""" self._check(pn_transport_bind(self._impl, connection._impl)) @@ -3355,6 +3359,9 @@ class SASL(Wrapper): OK = PN_SASL_OK AUTH = PN_SASL_AUTH + SYS = PN_SASL_SYS + PERM = PN_SASL_PERM + TEMP = PN_SASL_TEMP def __init__(self, transport): Wrapper.__init__(self, transport._impl, pn_transport_attachments) @@ -3368,6 +3375,14 @@ class SASL(Wrapper): return err @property + def user(self): + return pn_sasl_get_user(self._sasl) + + @property + def mech(self): + return pn_sasl_get_mech(self._sasl) + + @property def outcome(self): outcome = pn_sasl_outcome(self._sasl) if outcome == PN_SASL_NONE: @@ -3381,6 +3396,11 @@ class SASL(Wrapper): def done(self, outcome): pn_sasl_done(self._sasl, outcome) + def config_name(self, name): + pn_sasl_config_name(self._sasl, name) + + def config_path(self, path): + pn_sasl_config_path(self._sasl, path) class SSLException(TransportException): pass http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/78b4873f/proton-c/include/proton/transport.h ---------------------------------------------------------------------- diff --git a/proton-c/include/proton/transport.h b/proton-c/include/proton/transport.h index d046567..a3ca667 100644 --- a/proton-c/include/proton/transport.h +++ b/proton-c/include/proton/transport.h @@ -124,7 +124,7 @@ PN_EXTERN void pn_transport_free(pn_transport_t *transport); * * This is usually used at the the server end to find the name of the authenticated user. * On the client it will merely return whatever user was passed in to the - * pn_transport_set_user_password() API. + * pn_connection_set_user() API of the bound connection. * * The returned value is only reliable after the PN_TRANSPORT_AUTHENTICATED event has been received. * --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org