core/usermanager.lua

Sat, 04 Oct 2008 02:40:47 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 04 Oct 2008 02:40:47 +0100
changeset 47
33ed4c6ac249
parent 38
3fdfd6e0cb4e
child 53
14ea0fe6ca86
permissions
-rw-r--r--

Fix stanza handlers to use xmlns also for matching

0
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
1
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
2 require "util.datamanager"
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
3 local datamanager = datamanager;
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
4
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
5 module "usermanager"
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
6
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
7 function validate_credentials(host, username, password)
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
8 local credentials = datamanager.load(username, host, "accounts") or {};
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
9 if password == credentials.password then return true; end
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
10 return false;
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
11 end
38
Matthew Wild <mwild1@gmail.com>
parents: 0
diff changeset
12
Matthew Wild <mwild1@gmail.com>
parents: 0
diff changeset
13 return _M;

mercurial