From d0419a716475308eacf85cc919ad7d82988c8c74 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 3 Sep 2010 07:47:53 +0000 Subject: Allow authenticator library to be specified in the config file. --- lib/authenticator.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/authenticator.lua') 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" -- cgit v1.2.3