diff options
Diffstat (limited to 'src/Client/Authenticators/ChallengeResponseAuthenticator.cpp')
-rw-r--r-- | src/Client/Authenticators/ChallengeResponseAuthenticator.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp b/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp index 33e5ccd..4aadb63 100644 --- a/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp +++ b/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp @@ -28,7 +28,7 @@ namespace Client { namespace Authenticators { void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::sendRequest() { - Common::XmlPacket packet; + Common::XmlData packet; packet.setType("Authenticate"); packet.set("method", "Challenge-Response"); packet.set("subMethod", hash); @@ -38,7 +38,7 @@ void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::sendRequest() sendPacket(packet); } -void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::handlePacket(boost::shared_ptr<const Common::XmlPacket> packet) { +void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::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"))); @@ -51,7 +51,7 @@ void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::handlePacket( return; // TODO Logging } - Common::XmlPacket ret; + Common::XmlData ret; ret.setType("Authenticate"); ret.set("method", "Challenge-Response"); ret.set("subMethod", hash); @@ -88,20 +88,20 @@ void ChallengeResponseAuthenticator::authenticate(Common::Application *applicati 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") != "Challenge-Response") 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; @@ -122,7 +122,7 @@ void ChallengeResponseAuthenticator::authenticate(Common::Application *applicati 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; |