summaryrefslogtreecommitdiffstats
path: root/lib/authenticator.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2010-09-03 07:47:53 +0000
committerTed Trask <ttrask01@yahoo.com>2010-09-03 07:47:53 +0000
commitd0419a716475308eacf85cc919ad7d82988c8c74 (patch)
tree582ada3016e9e13e7563b81e7e67a843dd04b86a /lib/authenticator.lua
parentf2a71825f2eadba0b66a0be62b4978a814ba3faf (diff)
downloadacf-core-d0419a716475308eacf85cc919ad7d82988c8c74.tar.bz2
acf-core-d0419a716475308eacf85cc919ad7d82988c8c74.tar.xz
Allow authenticator library to be specified in the config file.
Diffstat (limited to 'lib/authenticator.lua')
-rw-r--r--lib/authenticator.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/authenticator.lua b/lib/authenticator.lua
index 3b81661..45caec7 100644
--- a/lib/authenticator.lua
+++ b/lib/authenticator.lua
@@ -10,7 +10,11 @@ require("md5")
-- This is the sub-authenticator
-- In the future, this will be set based upon configuration
-- This is a public variable to allow other controllers (ie tinydns) to do their own permissions
-auth = require("authenticator-plaintext")
+if APP and APP.conf and APP.conf.authenticator and APP.conf.authenticator ~= "" then
+ auth = require(string.gsub(APP.conf.authenticator, "%.lua$", ""))
+else
+ auth = require("authenticator-plaintext")
+end
-- Publicly define the pre-defined tables
usertable = "passwd"