Hi dear developers!
I'm testing cgilua.authentication but totally stucked with it and I have no clue how to resolve this. I attached my authentication_conf.lua script and here is the result: NO cgilua.authentication ! ...ar/www/servers/ugluk//cgilua/authentication_conf.lua:51: attempt to index field 'authentication' (a nil value) stack traceback: ...ar/www/servers/ugluk//cgilua/authentication_conf.lua:51: in main chunk stack traceback: /usr/local/share/lua/5.1//cgilua.lua:161: in function 'err' /usr/local/share/lua/5.1//coxpcall.lua:24: in function (tail call): ? (tail call): ? /usr/local/share/lua/5.1//cgilua.lua:169: in function (tail call): ? (tail call): ? /var/www/servers/ugluk//cgilua/config.lua:13: in main chunk /usr/local/lib/lua/5.1//?.so;/.luarocks/lib/lua/5.1//?.so;/usr/local/lib/lua/5.1//?.so;/root/.luarocks/lib/lua/5.1//?.so;/usr/local/lib/lua/5.1//?.so;/root/.luarocks/lib/lua/5.1//?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so; [unknown language] nil What do I wrong? Please help! Amor Kalo |
---------------------------- -- Authentication configuration file -- -- Defines the method and details of the authentication mechanism -- -- $Id: authentication_conf.lua,v 1.1 2007/12/05 18:40:17 carregal Exp $ ----------------------------
require "cgilua.authentication" if not cgilua.authentication then print ("NO cgilua.authentication !") end local options = { -- Authentication method: "simpledatabase", "webserver", "ldap", "test" method = "test", -- How Authentication is stored on the client -- This directive can be "cookie" or "url" tokenPersistence="url", -- Name used for the token persitence tokenName = "userhash", -- The criptografic key to encode user information on cookies and URLs criptKey="sfdtdyedbbg", -- Where to redirect when authentication is needed -- checkURL="https://remotehost/sso/authenticate", -- absolute URL checkURL="check.lua", -- authentication controller used by app.lua } local methods = { test = {} } -- -- Test authentication method -- methods.test.check = function(username,userpasswd) if (username == "admin") and (userpasswd == "admin") then return true else return false, "Wrong user/password combination!" end end cgilua.authentication.configure(options, methods)
_______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/