summaryrefslogtreecommitdiffstats
path: root/src/Server/RequestHandlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Server/RequestHandlers')
-rw-r--r--src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp14
1 files changed, 12 insertions, 2 deletions
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_ptr<co
Common::XmlPacket::List::iterator entry = list->addEntry();
entry->set("name", *method);
+ Common::XmlPacket::List *subList = entry->createList("subMethods");
+
+ const std::vector<std::string> &subMethods = application->getAuthManager()->getSubMethods(*method);
+
+ for(std::vector<std::string>::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<const Co
std::vector<boost::uint8_t> response;
boost::shared_ptr<const Common::AuthContext> authContext = application->getConnectionManager()->authenticateConnection(connection,
- packet->get<const std::string&>("method"), packet->get<const std::string&>("user"),
- packet->get<const std::vector<boost::uint8_t>&>("data"), response);
+ packet->get<const std::string&>("method"), packet->get<const std::string&>("subMethod"),
+ packet->get<const std::string&>("user"), packet->get<const std::vector<boost::uint8_t>&>("data"),
+ response);
if(!response.empty())
ret->set("data", response);