aboutsummaryrefslogtreecommitdiff
path: root/src/cyrsasl.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cyrsasl.erl')
-rw-r--r--src/cyrsasl.erl28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/cyrsasl.erl b/src/cyrsasl.erl
index 21fbc9660..a101e1380 100644
--- a/src/cyrsasl.erl
+++ b/src/cyrsasl.erl
@@ -88,13 +88,8 @@ start() ->
ok.
%%
--spec(register_mechanism/3 ::
-(
- Mechanim :: mechanism(),
- Module :: module(),
- PasswordType :: password_type())
- -> any()
-).
+-spec register_mechanism(Mechanim :: mechanism(), Module :: module(),
+ PasswordType :: password_type()) -> any().
register_mechanism(Mechanism, Module, PasswordType) ->
case is_disabled(Mechanism) of
@@ -139,11 +134,7 @@ check_credentials(_State, Props) ->
_LUser -> ok
end.
--spec(listmech/1 ::
-(
- Host ::binary())
- -> Mechanisms::mechanisms()
-).
+-spec listmech(Host ::binary()) -> Mechanisms::mechanisms().
listmech(Host) ->
Mechs = ets:select(sasl_mechanism,
@@ -213,12 +204,7 @@ server_step(State, ClientIn) ->
%% Remove the anonymous mechanism from the list if not enabled for the given
%% host
%%
--spec(filter_anonymous/2 ::
-(
- Host :: binary(),
- Mechs :: mechanisms())
- -> mechanisms()
-).
+-spec filter_anonymous(Host :: binary(), Mechs :: mechanisms()) -> mechanisms().
filter_anonymous(Host, Mechs) ->
case ejabberd_auth_anonymous:is_sasl_anonymous_enabled(Host) of
@@ -226,11 +212,7 @@ filter_anonymous(Host, Mechs) ->
false -> Mechs -- [<<"ANONYMOUS">>]
end.
--spec(is_disabled/1 ::
-(
- Mechanism :: mechanism())
- -> boolean()
-).
+-spec is_disabled(Mechanism :: mechanism()) -> boolean().
is_disabled(Mechanism) ->
Disabled = ejabberd_config:get_option(