Check ejabberd_auth_http options names and values

This commit is contained in:
Badlop 2018-09-06 12:59:43 +02:00
parent 8978f38c22
commit 97de583107
1 changed files with 15 additions and 1 deletions

View File

@ -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.