aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_external_services.lua
Commit message (Collapse)AuthorAgeFilesLines
* mod_external_services: Move error message to correct place (fix #1725)Kim Alvefur2022-03-231-2/+2
| | | | | This message was misplaced in c4599a7c534c when the @type and @host check was introduced.
* mod_external_services: Warn about missing recommended fieldsKim Alvefur2021-11-241-0/+4
| | | | | | | | These are RECOMMENDED in XEP-0215 so most likely a mistake if they are left out. Of the two REQUIRED fields, 'host' falls back to module.host and 'type' rejects the whole item.
* mod_external_services: Factor out public function for converting to XMLKim Alvefur2021-08-301-28/+21
| | | | | | | | Along with the previous commit, allows building the XML thing yourself, should you wish to send it yourself or use it in a different context than an iq reply. API change: The 'reply' is removed from the event.
* mod_external_services: Factor out public function returning current servicesKim Alvefur2021-08-301-8/+11
| | | | | This way you get the _prepared_ services and don't have to do that mapping yourself.
* mod_external_services: Filter services by requested credentials using a SetKim Alvefur2021-08-301-23/+21
| | | | Please don't be accidentally quadratic.
* mod_external_services: Validate required attributes on credentials requestsKim Alvefur2021-08-291-1/+6
|
* mod_external_services: Report overall status as a module statusKim Alvefur2021-06-211-2/+4
| | | | | | | | | | | | | Because during startup, if all items are provided by a different module (e.g. mod_turn_external) then this would log a scary warning even if everything is fine after that other module has been loaded. This way, any persistent problematic state is reported in the console. Errors with individual items should still be reported by prepare(). Now, if you load mod_external_services alone without configuring any services, no error or warning is reported in the log, but maybe that's not so bad with it reported in the console.
* mod_external_services: Validate items as they are addedKim Alvefur2021-06-211-0/+4
|
* mod_external_services: Also validate services added by other modulesKim Alvefur2021-06-211-1/+2
| | | | | | | | This ensures that problems with entries added other modules, e.g. mod_turn_external, are reported on startup. However, this depends on load order and whether a `module:depends()` call comes before the `module:add_item()` call. A followup commit will do something about that.
* mod_external_services: Validate services added via eventsKim Alvefur2020-08-171-0/+14
| | | | | | | | | | | | While writing developer documentation it became obvious that i was silly to have one item format for config and items API, and another format for the event API. Then there's the stanza format, but that's a common pattern. This change reduces the possible input formats to two and allows other modules the benefit of the processing and validation performed on items from the config.
* mod_external_services: Allow specifying a credential generation callbackKim Alvefur2020-07-251-1/+1
| | | | | This is especially targeted at services added via the items API. More involved credential generation should use the event hook.
* mod_external_services: Prepare to allow more credential algorithmsKim Alvefur2020-07-251-13/+25
| | | | | | Not sure what algorithms might fit here. Separation makes some sense. This is also a preparation for having a callback. (See next commit)
* mod_external_services: Support adding services via items APIKim Alvefur2020-07-251-2/+4
|
* mod_external_services: XEP-0215: External Service DiscoveryKim Alvefur2020-07-181-0/+205