Software / code / prosody-modules
File
mod_auth_external_insecure/examples/lua/prosody-auth-example.lua @ 6327:578fa5d97daa
mod_http_oauth2: Avoid tripping on redirect URIs when omitted
Since device clients don't need to include redirect_uris, this function
needs to handle that case and not try to index the missing array.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 03 Jul 2025 16:18:38 +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