gitlab_omniauth-ldap 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db6838fb57912673dc6d4f8fd4089ae1b9831f9c
4
- data.tar.gz: 3ee20be54a32a77fb7e89e73332f2f58c50ed426
3
+ metadata.gz: 490e5818be98881b26e804e7d75021b1a22aaca2
4
+ data.tar.gz: 185305045176824f1f43de77cf762fc0094a3db9
5
5
  SHA512:
6
- metadata.gz: 02136014d91a8bdc9f989c9010e7a076852281d708123bfd97300aa5b55ef82f2f169f4b10154978f63cca3dd4dd48ddd4a5c9afc8ea6c272d47eb06d26cf00b
7
- data.tar.gz: 6ec729393916b48600105bdbf041b50cc45172a537b760cd33be0e4150a03cfc1f0bb263b6577bb6d0661967f4b3f2def6262faaa96f56c982a1320d6361d83b
6
+ metadata.gz: e74ed52e82763ff87707d60339b24107737dc03c62e25fca0897e18b25bf4cfa3a0af8eb27e7899ebb9141c90918eac200eb699394ff0165fef059a68d63760d
7
+ data.tar.gz: 20aff7c1a787d21313981cdc6849245306d17778602f368f8f11a0c5a3c69c08f16aaa4b57982d9d1e101512f3fc8890255f1d3b8cf1c19a40204eeb9f9bd378
@@ -69,6 +69,7 @@ module OmniAuth
69
69
  hosts: @hosts,
70
70
  host: @host,
71
71
  port: @port,
72
+ encryption: encryption_options
72
73
  }
73
74
  @bind_method = @try_sasl ? :sasl : (@allow_anonymous||!@bind_dn||!@password ? :anonymous : :simple)
74
75
 
@@ -80,7 +81,6 @@ module OmniAuth
80
81
  }
81
82
  config[:auth] = @auth
82
83
  @connection = Net::LDAP.new(config)
83
- @connection.encryption(encryption_options)
84
84
  end
85
85
 
86
86
  #:base => "dc=yourcompany, dc=com",
@@ -109,6 +109,7 @@ module OmniAuth
109
109
 
110
110
  def encryption_options
111
111
  translated_method = translate_method
112
+ return nil unless translated_method
112
113
 
113
114
  {
114
115
  method: translated_method,
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module LDAP
3
- VERSION = "2.0.1"
3
+ VERSION = "2.0.2"
4
4
  end
5
5
  end
@@ -38,7 +38,7 @@ describe OmniAuth::LDAP::Adaptor do
38
38
  adaptor.connection.port.should == 389
39
39
  adaptor.connection.base.should == 'dc=intridea, dc=com'
40
40
  adaptor.connection.instance_variable_get('@auth').should == {:method => :simple, :username => 'bind_dn', :password => 'password'}
41
- adaptor.connection.instance_variable_get('@encryption').should == {:method => nil, :tls_options => {}}
41
+ adaptor.connection.instance_variable_get('@encryption').should == nil
42
42
  end
43
43
 
44
44
  it 'should setup ldap connection with sasl-md5' do
@@ -93,14 +93,9 @@ describe OmniAuth::LDAP::Adaptor do
93
93
  end
94
94
 
95
95
  context 'when encryption is plain' do
96
- it 'should set the encryption method to nil' do
96
+ it 'should set encryption to nil' do
97
97
  adaptor = OmniAuth::LDAP::Adaptor.new({host: "192.168.1.145", encryption: 'plain', base: 'dc=intridea, dc=com', port: 389, uid: 'sAMAccountName'})
98
- adaptor.connection.instance_variable_get('@encryption').should include method: nil
99
- end
100
-
101
- it 'should set the encryption tls_options to empty' do
102
- adaptor = OmniAuth::LDAP::Adaptor.new({host: "192.168.1.145", encryption: 'plain', base: 'dc=intridea, dc=com', port: 389, uid: 'sAMAccountName'})
103
- adaptor.connection.instance_variable_get('@encryption').should include tls_options: {}
98
+ adaptor.connection.instance_variable_get('@encryption').should eq(nil)
104
99
  end
105
100
  end
106
101
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_omniauth-ldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ping Yu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-09 00:00:00.000000000 Z
11
+ date: 2017-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth