Software /
code /
prosody
File
util/sasl/external.lua @ 11992:876e1b6d6ae4
mod_http_file_share: Limit query to time since last expiry
This is probably a bad idea, as files that could not be deleted for some
reason will not be tried again. I was just thinking of what the 'task'
argument could be used for.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 30 Nov 2021 00:52:07 +0100 |
parent | 8555:4f0f5b49bb03 |
child | 12975:d10957394a3c |
line wrap: on
line source
local saslprep = require "util.encodings".stringprep.saslprep; local _ENV = nil; -- luacheck: std none local function external(self, message) message = saslprep(message); local state self.username, state = self.profile.external(message); if state == false then return "failure", "account-disabled"; elseif state == nil then return "failure", "not-authorized"; elseif state == "expired" then return "false", "credentials-expired"; end return "success"; end local function init(registerMechanism) registerMechanism("EXTERNAL", {"external"}, external); end return { init = init; }