Software / code / prosody-modules
File
mod_auth_external_insecure/examples/lua/prosody-auth-example.lua @ 5161:6af2d74daa15
mod_http_status: Report module statuses
Uncommitted code from 2021
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 30 Jan 2023 00:48:12 +0100 |
| parent | 3884:f84ede3e9e3b |
line wrap: on
line source
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