Files
@ f0c6b4239acf
Branch filter:
Location: libtransport.git/include/Swiften/Server/SimpleUserRegistry.cpp - annotation
f0c6b4239acf
763 B
text/x-c++hdr
Removed commented MyIrcBuffer classs
828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 c7f2b6298073 828ae9d2cb88 c7f2b6298073 c7f2b6298073 c7f2b6298073 c7f2b6298073 c7f2b6298073 c7f2b6298073 c7f2b6298073 c7f2b6298073 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 828ae9d2cb88 | /*
* Copyright (c) 2010 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#include <Swiften/Server/SimpleUserRegistry.h>
namespace Swift {
SimpleUserRegistry::SimpleUserRegistry() {
}
void SimpleUserRegistry::isValidUserPassword(const JID& user, ServerFromClientSession *session, const SafeByteArray& password) {
std::map<JID,SafeByteArray>::const_iterator i = users.find(user);
if (i != users.end() && i->second == password) {
session->handlePasswordValid();
}
else {
session->handlePasswordInvalid();
}
}
void SimpleUserRegistry::addUser(const JID& user, const std::string& password) {
users.insert(std::make_pair(user, createSafeByteArray(password)));
}
}
|