Software /
code /
prosody-modules
File
mod_auth_external_insecure/examples/lua/prosody-auth-example.lua @ 6220:c83bfcc6ac0a
mod_cloud_notify_encrypted: Use new 'util.crypto' on Prosody 13.0
This removes the dependency on lua-luaossl when running on Prosody 13.0
(or trunk) which has util.crypto
Compatibility with Prosody 0.12 retained but also the dependency
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 31 Mar 2025 13:24:44 +0200 |
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