diff options
| author | Gordon Sim <gsim@apache.org> | 2010-06-30 22:22:50 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2010-06-30 22:22:50 +0000 |
| commit | 2e1dceecfe6ed1bd8441f0b4449dea5b9b40a495 (patch) | |
| tree | 9b3824c51f08a29e9cc509c20f1bee9c030300d3 /cpp/src/qpid/client | |
| parent | 2e0decdf234d5cf10a42453be02532756ac95aa9 (diff) | |
| download | qpid-python-2e1dceecfe6ed1bd8441f0b4449dea5b9b40a495.tar.gz | |
QPID-664: expose authenticated username for connection
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@959461 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client')
| -rw-r--r-- | cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp | 4 | ||||
| -rw-r--r-- | cpp/src/qpid/client/amqp0_10/ConnectionImpl.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp b/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp index f93df90d7e..2fe55cc035 100644 --- a/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp +++ b/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp @@ -325,5 +325,9 @@ bool ConnectionImpl::backoff() return false; } } +std::string ConnectionImpl::getAuthenticatedUsername() +{ + return connection.getNegotiatedSettings().username; +} }}} // namespace qpid::client::amqp0_10 diff --git a/cpp/src/qpid/client/amqp0_10/ConnectionImpl.h b/cpp/src/qpid/client/amqp0_10/ConnectionImpl.h index 904cef750c..8467376725 100644 --- a/cpp/src/qpid/client/amqp0_10/ConnectionImpl.h +++ b/cpp/src/qpid/client/amqp0_10/ConnectionImpl.h @@ -51,6 +51,7 @@ class ConnectionImpl : public qpid::messaging::ConnectionImpl void detach(); void setOption(const std::string& name, const qpid::types::Variant& value); bool backoff(); + std::string getAuthenticatedUsername(); private: typedef std::map<std::string, qpid::messaging::Session> Sessions; |
