oa-enterprise 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/omniauth/strategies/ldap.rb +4 -6
  2. metadata +7 -7
@@ -7,7 +7,7 @@ module OmniAuth
7
7
  include OmniAuth::Strategy
8
8
 
9
9
  autoload :Adaptor, 'omniauth/strategies/ldap/adaptor'
10
- @@config = {'first_name' => 'givenName', 'last_name' => 'sn', 'email' => ['mail', "email", 'userPrincipalName'],
10
+ @@config = {'name' => 'cn', 'first_name' => 'givenName', 'last_name' => 'sn', 'email' => ['mail', "email", 'userPrincipalName'],
11
11
  'phone' => ['telephoneNumber', 'homePhone', 'facsimileTelephoneNumber'],
12
12
  'mobile_number' => ['mobile', 'mobileTelephoneNumber'],
13
13
  'nickname' => ['uid', 'userid', 'sAMAccountName'],
@@ -44,14 +44,12 @@ module OmniAuth
44
44
  @adaptor.bind(:bind_dn => request.POST['username'], :password => request.POST['password'])
45
45
  @ldap_user_info = @adaptor.search(:filter => Net::LDAP::Filter.eq(@adaptor.uid, request.POST['username']),:limit => 1)
46
46
  @user_info = self.class.map_user(@@config, @ldap_user_info)
47
- request.POST['auth'] = auth_hash
48
47
  @env['REQUEST_METHOD'] = 'GET'
49
48
  @env['PATH_INFO'] = "#{OmniAuth.config.path_prefix}/#{name}/callback"
50
49
 
51
- @app.call(@env)
50
+ call_app!
52
51
  rescue Exception => e
53
- puts e.message
54
- fail!(:invalid_credentials)
52
+ fail!(:invalid_credentials, e)
55
53
  end
56
54
  end
57
55
 
@@ -91,4 +89,4 @@ module OmniAuth
91
89
  end
92
90
  end
93
91
  end
94
- end
92
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oa-enterprise
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - James A. Rosen
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-06 00:00:00 -05:00
19
+ date: 2010-10-11 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -25,12 +25,12 @@ dependencies:
25
25
  requirements:
26
26
  - - "="
27
27
  - !ruby/object:Gem::Version
28
- hash: 31
28
+ hash: 29
29
29
  segments:
30
30
  - 0
31
31
  - 1
32
- - 2
33
- version: 0.1.2
32
+ - 3
33
+ version: 0.1.3
34
34
  requirement: *id001
35
35
  name: oa-core
36
36
  prerelease: false