mod_auth_external/examples/lua/prosody-auth-example.lua
changeset 3888 f84ede3e9e3b
parent 3887 571249f69577
child 3889 1ec45dbc7db5
--- a/mod_auth_external/examples/lua/prosody-auth-example.lua	Wed Feb 05 23:38:57 2020 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-local actions = {};
-
-function actions.auth(data)
-	local user, host, pass = data:match("^([^:]+):([^:]+):(.+)$");
-	if user == "someone" then
-		return "1";
-	end
-end
-
-for line in io.lines() do
-	local action, data = line:match("^([^:]+)(.*)$");
-	print(actions[action] and actions[action](data) or "0");
-end