diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-12-28 09:47:11 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-12-28 09:47:11 +0300 |
commit | 309bdfbe285c82726d2ce1406fc26c19a6b37bd9 (patch) | |
tree | 2e5f67c08c65b3951d86e19f0a86f4140e321b0b /src/ejabberd_auth.erl | |
parent | Rewrite ejabberd_service to use new XMPP stream API (diff) |
Add xmpp_stream_out behaviour and rewrite s2s/SM code
Diffstat (limited to 'src/ejabberd_auth.erl')
-rw-r--r-- | src/ejabberd_auth.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ejabberd_auth.erl b/src/ejabberd_auth.erl index 74c8009c..eba0a403 100644 --- a/src/ejabberd_auth.erl +++ b/src/ejabberd_auth.erl @@ -42,7 +42,7 @@ get_password_s/2, get_password_with_authmodule/2, is_user_exists/2, is_user_exists_in_other_modules/3, remove_user/2, remove_user/3, plain_password_required/1, - store_type/1, entropy/1]). + store_type/1, entropy/1, backend_type/1]). -export([auth_modules/1, opt_type/1]). @@ -412,6 +412,13 @@ entropy(B) -> length(S) * math:log(lists:sum(Set)) / math:log(2) end. +-spec backend_type(atom()) -> atom(). +backend_type(Mod) -> + case atom_to_list(Mod) of + "ejabberd_auth_" ++ T -> list_to_atom(T); + _ -> Mod + end. + %%%---------------------------------------------------------------------- %%% Internal functions %%%---------------------------------------------------------------------- |