core/usermanager.lua

Thu, 02 Oct 2008 01:08:58 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 02 Oct 2008 01:08:58 +0100
changeset 38
3fdfd6e0cb4e
parent 0
3e3171b59028
child 53
14ea0fe6ca86
permissions
-rw-r--r--

SASL!
(but before you get too excited, no resource binding yet. And yes, there are still plenty of rough edges to the code...)
((eg. must move <stream:features> out of xmlhandlers.lua o_O ))


require "util.datamanager"
local datamanager = datamanager;

module "usermanager"

function validate_credentials(host, username, password)
	local credentials = datamanager.load(username, host, "accounts") or {};
	if password == credentials.password then return true; end
	return false;
end

return _M;

mercurial