From c964aa2708ed2839ded3c35eed7338f3e81f568f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 24 Aug 2009 04:47:54 +0200 Subject: =?UTF-8?q?Authentifikation:=20=C3=9Cbertrage=20Passw=C3=B6rter=20?= =?UTF-8?q?gehasht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RequestHandlers/ConnectionRequestHandlerGroup.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/Server/RequestHandlers') diff --git a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp index 37e2e79..7607171 100644 --- a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp +++ b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp @@ -43,6 +43,15 @@ void ConnectionRequestHandlerGroup::handleAuthMethodRequest(boost::shared_ptraddEntry(); entry->set("name", *method); + Common::XmlPacket::List *subList = entry->createList("subMethods"); + + const std::vector &subMethods = application->getAuthManager()->getSubMethods(*method); + + for(std::vector::const_iterator subMethod = subMethods.begin(); subMethod != subMethods.end(); ++subMethod) { + Common::XmlPacket::List::iterator subEntry = subList->addEntry(); + + subEntry->set("name", *subMethod); + } } } @@ -50,8 +59,9 @@ void ConnectionRequestHandlerGroup::handleAuthRequest(boost::shared_ptr response; boost::shared_ptr authContext = application->getConnectionManager()->authenticateConnection(connection, - packet->get("method"), packet->get("user"), - packet->get&>("data"), response); + packet->get("method"), packet->get("subMethod"), + packet->get("user"), packet->get&>("data"), + response); if(!response.empty()) ret->set("data", response); -- cgit v1.2.3