diff --git a/ejabberd_auth_http/src/ejabberd_auth_http.erl b/ejabberd_auth_http/src/ejabberd_auth_http.erl index 8bd213d..2e657d8 100644 --- a/ejabberd_auth_http/src/ejabberd_auth_http.erl +++ b/ejabberd_auth_http/src/ejabberd_auth_http.erl @@ -37,7 +37,21 @@ %%% API %%%---------------------------------------------------------------------- -opt_type(auth_opts) -> fun (V) -> V end; +opt_type(auth_opts) -> + fun(L) -> + lists:map( + fun({host, V}) when is_binary(V) -> + {host, V}; + ({connection_pool_size, V}) when is_integer(V) -> + {connection_pool_size, V}; + ({connection_opts, V}) when is_list(V) -> + {connection_opts, V}; + ({basic_auth, V}) when is_binary(V) -> + {basic_auth, V}; + ({path_prefix, V}) when is_binary(V) -> + {path_prefix, V} + end, L) + end; opt_type(_) -> [auth_opts]. -spec start(binary()) -> ok.