Use the new spec

This commit is contained in:
Simon MacMullen 2010-11-24 11:42:42 +00:00
parent 6a8f5cf9e4
commit d5006b3a81
1 changed files with 4 additions and 1 deletions

View File

@ -37,7 +37,7 @@
-include_lib("rabbit_common/include/rabbit.hrl").
-behaviour(rabbit_auth_backend).
%%-include("rabbit_auth_backend_spec.hrl").
-include_lib("rabbit_common/include/rabbit_auth_backend_spec.hrl").
-export([description/0]).
-export([check_user_login/2, check_vhost_access/3, check_resource_access/3]).
@ -115,6 +115,9 @@ evaluate_ldap(#user{username = U, impl = P}, Q, Args, State) ->
%% TODO - ATM we create and destroy a new LDAP connection on every
%% call. This could almost certainly be more efficient.
%% Also this requires that we store the password in #user.impl, which
%% is quite dodgy - all sorts of crash scenarios lead to the contents of
%% #user getting logged.
with_ldap(Username, Password, Fun,
State = #state{ servers = Servers,
user_dn_pattern = UserDnPattern,