aboutsummaryrefslogtreecommitdiff
path: root/src/cyrsasl.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cyrsasl.erl')
-rw-r--r--src/cyrsasl.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cyrsasl.erl b/src/cyrsasl.erl
index 764473bab..970da5bb9 100644
--- a/src/cyrsasl.erl
+++ b/src/cyrsasl.erl
@@ -25,10 +25,13 @@
-module(cyrsasl).
+-behaviour(ejabberd_config).
+
-author('alexey@process-one.net').
-export([start/0, register_mechanism/3, listmech/1,
- server_new/7, server_start/3, server_step/2]).
+ server_new/7, server_start/3, server_step/2,
+ opt_type/1]).
-include("ejabberd.hrl").
-include("logger.hrl").
@@ -237,3 +240,10 @@ is_disabled(Mechanism) ->
[str:to_upper(V)]
end, []),
lists:member(Mechanism, Disabled).
+
+opt_type(disable_sasl_mechanisms) ->
+ fun (V) when is_list(V) ->
+ lists:map(fun (M) -> str:to_upper(M) end, V);
+ (V) -> [str:to_upper(V)]
+ end;
+opt_type(_) -> [disable_sasl_mechanisms].