diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-08-24 04:47:54 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-08-24 04:47:54 +0200 |
commit | c964aa2708ed2839ded3c35eed7338f3e81f568f (patch) | |
tree | 21f17452e648cd25c7cdf80d844b1a366767f14b /src/Server/RequestHandlers | |
parent | 84a5ceeb7db03d75425d72e8a23a0bb0f267bc01 (diff) | |
download | mad-c964aa2708ed2839ded3c35eed7338f3e81f568f.tar mad-c964aa2708ed2839ded3c35eed7338f3e81f568f.zip |
Authentifikation: Übertrage Passwörter gehasht
Diffstat (limited to 'src/Server/RequestHandlers')
-rw-r--r-- | src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp | 14 |
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); |