Files
        @ 66a28343341c
    
        
              Branch filter: 
        
    Location: libtransport.git/include/Swiften/Server/SimpleUserRegistry.cpp - annotation
        
            
            66a28343341c
            763 B
            text/x-c++hdr
        
        
    
    Merge pull request #2 from mcepl/fix_build_tarball
Make the build_*.sh scripts a little bit more robust.
    Make the build_*.sh scripts a little bit more robust.
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)));
}
}
 |