Files
@ c63c87c023a0
Branch filter:
Location: libtransport.git/include/Swiften/Server/SimpleUserRegistry.cpp - annotation
c63c87c023a0
763 B
text/x-c++hdr
Travis: fix macOS build
do not use bottled libswiften to avoid boost linkage errors
do not use bottled libswiften to avoid boost linkage errors
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)));
}
}
|