summaryrefslogtreecommitdiffstats
path: root/src/Client/Authenticators/PasswordAuthenticator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Client/Authenticators/PasswordAuthenticator.cpp')
-rw-r--r--src/Client/Authenticators/PasswordAuthenticator.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Client/Authenticators/PasswordAuthenticator.cpp b/src/Client/Authenticators/PasswordAuthenticator.cpp
index 8887d96..bf2a284 100644
--- a/src/Client/Authenticators/PasswordAuthenticator.cpp
+++ b/src/Client/Authenticators/PasswordAuthenticator.cpp
@@ -28,7 +28,7 @@ namespace Client {
namespace Authenticators {
void PasswordAuthenticator::PasswordAuthRequest::sendRequest() {
- Common::XmlPacket packet;
+ Common::XmlData packet;
packet.setType("Authenticate");
packet.set("method", "Password");
packet.set("subMethod", hash);
@@ -43,7 +43,7 @@ void PasswordAuthenticator::PasswordAuthRequest::sendRequest() {
sendPacket(packet);
}
-void PasswordAuthenticator::PasswordAuthRequest::handlePacket(boost::shared_ptr<const Common::XmlPacket> packet) {
+void PasswordAuthenticator::PasswordAuthRequest::handlePacket(boost::shared_ptr<const Common::XmlData> packet) {
if(packet->getType() == "Error") {
signalFinished(Core::Exception(packet->get<const std::string&>("Where"), static_cast<Core::Exception::ErrorCode>(packet->get<long>("ErrorCode")),
packet->get<long>("SubCode"), packet->get<long>("SubSubCode")));
@@ -66,20 +66,20 @@ void PasswordAuthenticator::authenticate(Common::Application *application, Commo
application->getRequestManager()->sendRequest(con, request);
request->wait();
- std::pair<boost::shared_ptr<const Common::XmlPacket>, Core::Exception> result = request->getResult();
+ std::pair<boost::shared_ptr<const Common::XmlData>, Core::Exception> result = request->getResult();
if(!result.first || result.second)
throw result.second;
- const Common::XmlPacket::List *methods = result.first->getList("methods");
+ const Common::XmlData::List *methods = result.first->getList("methods");
- for(Common::XmlPacket::List::const_iterator method = methods->begin(); method != methods->end(); ++method) {
+ for(Common::XmlData::List::const_iterator method = methods->begin(); method != methods->end(); ++method) {
if(method->get<const std::string&>("name") != "Password")
continue;
- const Common::XmlPacket::List *subMethods = method->getList("subMethods");
+ const Common::XmlData::List *subMethods = method->getList("subMethods");
- for(Common::XmlPacket::List::const_iterator subMethod = subMethods->begin(); subMethod != subMethods->end(); ++subMethod) {
+ for(Common::XmlData::List::const_iterator subMethod = subMethods->begin(); subMethod != subMethods->end(); ++subMethod) {
if(Common::Hash::isHashSupported(subMethod->get<const std::string&>("name"))) {
hash = subMethod->get<const std::string&>("name");
break;
@@ -100,7 +100,7 @@ void PasswordAuthenticator::authenticate(Common::Application *application, Commo
application->getRequestManager()->sendRequest(con, request);
request->wait();
- std::pair<boost::shared_ptr<const Common::XmlPacket>, Core::Exception> result = request->getResult();
+ std::pair<boost::shared_ptr<const Common::XmlData>, Core::Exception> result = request->getResult();
if(!result.first || result.second)
throw result.second;