aboutsummaryrefslogtreecommitdiffstats
path: root/core/usermanager.lua
blob: 0f303b24af7d06d3f965445a505c2d184371fa59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

require "util.datamanager"
local datamanager = datamanager;
local log = require "util.logger".init("usermanager");

module "usermanager"

function validate_credentials(host, username, password)
	log("debug", "User '%s' is being validated", username);
	local credentials = datamanager.load(username, host, "accounts") or {};
	if password == credentials.password then return true; end
	return false;
end

return _M;