casino-ldap_authenticator 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -43,7 +43,8 @@ class CASino::LDAPAuthenticator
|
|
43
43
|
end
|
44
44
|
@user_plain = @ldap.bind_as(:base => @options[:base], :size => 1, :password => @password, :filter => user_filter)
|
45
45
|
if @user_plain != false
|
46
|
-
|
46
|
+
include_attributes = @options[:extra_attributes].values + [username_attribute]
|
47
|
+
@user_plain = @ldap.search(:base => @options[:base], :filter => user_filter, :attributes => include_attributes)
|
47
48
|
if @user_plain.is_a?(Array)
|
48
49
|
@user_plain = @user_plain.first
|
49
50
|
end
|
@@ -44,7 +44,7 @@ describe CASino::LDAPAuthenticator do
|
|
44
44
|
end
|
45
45
|
|
46
46
|
it 'calls the #search method on the LDAP connection' do
|
47
|
-
connection.should_receive(:search).with(:base => options[:base], :filter => user_filter, :attributes => extra_attributes)
|
47
|
+
connection.should_receive(:search).with(:base => options[:base], :filter => user_filter, :attributes => extra_attributes + [options[:username_attribute]])
|
48
48
|
subject.validate(username, password)
|
49
49
|
end
|
50
50
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: casino-ldap_authenticator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-11-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|