Added LDAP authentication support for ejabberd
This commit is contained in:
parent
22115a2843
commit
b3a507720a
2 changed files with 31 additions and 4 deletions
|
@ -213,11 +213,22 @@ override_acls.
|
|||
%%%. ==============
|
||||
%%%' AUTHENTICATION
|
||||
|
||||
<% if has_variable?("ejabberd_extauth") -%>
|
||||
{auth_method, external}.
|
||||
{extauth_program, "<%= ejabberd_extauth %>"}.
|
||||
<% if ejabberd_auth.is_a?(Array) -%>
|
||||
{auth_method, [<%= ejabberd_auth.join(", ") %>]}.
|
||||
<% else -%>
|
||||
{auth_method, internal}.
|
||||
{auth_method, <%= ejabberd_auth %>}.
|
||||
<% end -%>
|
||||
<% if has_variable?("ejabberd_extauth") -%>
|
||||
{extauth_program, "<%= ejabberd_extauth %>"}.
|
||||
<% end -%>
|
||||
<% if has_variable?("ejabberd_ldap_server") -%>
|
||||
<% ejabberd_ldap_server.map! { |server| '"%s"' % server } -%>
|
||||
{ldap_servers, [<%= ejabberd_ldap_server.join(", ") %>]}.
|
||||
{ldap_base, "<%= ejabberd_ldap_basedn %>"}.
|
||||
{ldap_encrypt, tls}.
|
||||
{ldap_port, 636}.
|
||||
{ldap_uids, [{"uid", "%u"}]}.
|
||||
{ldap_filter, "(!(loginShell=/sbin/nologin))"}.
|
||||
<% end -%>
|
||||
|
||||
%%
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue