summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-06-30 22:22:50 +0000
committerGordon Sim <gsim@apache.org>2010-06-30 22:22:50 +0000
commit35e26207bc5db7947c0d1a1abb05c4aba5c0e463 (patch)
tree9b3824c51f08a29e9cc509c20f1bee9c030300d3 /cpp/src/qpid/client
parente5b931c37b591ed19fa5a63afd2d05d6f1fca13e (diff)
downloadqpid-python-35e26207bc5db7947c0d1a1abb05c4aba5c0e463.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.cpp4
-rw-r--r--cpp/src/qpid/client/amqp0_10/ConnectionImpl.h1
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;