aboutsummaryrefslogtreecommitdiff
path: root/src/mod_legacy_auth.erl
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2020-01-08 12:24:51 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2020-01-08 12:24:51 +0300
commit97da380acd8e3ba0c9a9618a99c4106eca1d1576 (patch)
treecc2b8fb7e175afcaf182a3595735f6f9177ec3dc /src/mod_legacy_auth.erl
parentUpdate deps (diff)
Generate ejabberd.yml.5 man page from source code directly
Several documentation callbacks (doc/0 and mod_doc/0) are implemented and `ejabberdctl man` command is added to generate a man page. Note that the command requires a2x to be installed (which is a part of asciidoc package).
Diffstat (limited to '')
-rw-r--r--src/mod_legacy_auth.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mod_legacy_auth.erl b/src/mod_legacy_auth.erl
index a48ef8de5..1b25be54b 100644
--- a/src/mod_legacy_auth.erl
+++ b/src/mod_legacy_auth.erl
@@ -25,7 +25,7 @@
-protocol({xep, 78, '2.5'}).
%% gen_mod API
--export([start/2, stop/1, reload/3, depends/2, mod_options/1]).
+-export([start/2, stop/1, reload/3, depends/2, mod_options/1, mod_doc/0]).
%% hooks
-export([c2s_unauthenticated_packet/2, c2s_stream_features/2]).
@@ -58,6 +58,15 @@ depends(_Host, _Opts) ->
mod_options(_) ->
[].
+mod_doc() ->
+ #{desc =>
+ [?T("The module implements "
+ "https://xmpp.org/extensions/xep-0078.html"
+ "[XEP-0078: Non-SASL Authentication]."), "",
+ ?T("NOTE: This type of authentication was obsoleted in "
+ "2008 and you unlikely need this module unless "
+ "you have something like outdated Jabber bots.")]}.
+
-spec c2s_unauthenticated_packet(c2s_state(), iq()) ->
c2s_state() | {stop, c2s_state()}.
c2s_unauthenticated_packet(State, #iq{type = T, sub_els = [_]} = IQ)