core/usermanager.lua

Sun, 24 Aug 2008 18:01:20 +0100

author
matthew@silver
date
Sun, 24 Aug 2008 18:01:20 +0100
changeset 5
57e4eb3aeac0
child 38
3fdfd6e0cb4e
permissions
-rw-r--r--

Added all the files to please hg :/

5
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
1
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
2 require "util.datamanager"
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
3 local datamanager = datamanager;
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
4
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
5 module "usermanager"
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
6
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
7 function validate_credentials(host, username, password)
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
8 local credentials = datamanager.load(username, host, "accounts") or {};
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
9 if password == credentials.password then return true; end
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
10 return false;
57e4eb3aeac0 Added all the files to please hg :/
matthew@silver
parents:
diff changeset
11 end

mercurial