gitlab_omniauth-ldap 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/lib/omniauth-ldap/adaptor.rb +7 -1
- data/lib/omniauth-ldap/version.rb +1 -1
- data/spec/omniauth-ldap/adaptor_spec.rb +5 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d0257f9f6fc7f3368403940bba04ecc860b8c52
|
4
|
+
data.tar.gz: 706ce31f13aa10bc0e5e982ae2ad52d611ec1dbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22c81461f04cd89702366adabeeff539195a887f046ebd1d0235f9bbbed2d0c8ace4a74e151924a37d330de3806727475e2d27790a328eb824e623e1e0e9295d
|
7
|
+
data.tar.gz: 29bcd91f9be90911956f7891f81f33fcc591c0258861e2a99f2b99312b8ae6473cec4dfcef4dd535081254530e8e50b0968aa385b127ba530459ec97ba2ae6c7
|
data/CHANGELOG
CHANGED
@@ -213,8 +213,14 @@ module OmniAuth
|
|
213
213
|
end
|
214
214
|
|
215
215
|
# Removes keys that have blank values
|
216
|
+
#
|
217
|
+
# This gem may not always be in the context of Rails so we
|
218
|
+
# do this rather than `.blank?`.
|
216
219
|
def sanitize_hash_values(hash)
|
217
|
-
hash.delete_if
|
220
|
+
hash.delete_if do |_, value|
|
221
|
+
value.nil? ||
|
222
|
+
(value.is_a?(String) && value !~ /\S/)
|
223
|
+
end
|
218
224
|
end
|
219
225
|
|
220
226
|
def symbolize_hash_keys(hash)
|
@@ -128,8 +128,11 @@ describe OmniAuth::LDAP::Adaptor do
|
|
128
128
|
|
129
129
|
context 'when tls_options are specified' do
|
130
130
|
it 'should pass the values along with defaults' do
|
131
|
-
|
132
|
-
|
131
|
+
cert = OpenSSL::X509::Certificate.new
|
132
|
+
key = OpenSSL::PKey::RSA.new
|
133
|
+
|
134
|
+
adaptor = OmniAuth::LDAP::Adaptor.new({host: "192.168.1.145", encryption: 'ssl', base: 'dc=intridea, dc=com', port: 636, uid: 'sAMAccountName', bind_dn: 'bind_dn', password: 'password', tls_options: { ca_file: '/etc/ca.pem', ssl_version: 'TLSv1_2', cert: cert, key: key }})
|
135
|
+
adaptor.connection.instance_variable_get('@encryption').should include tls_options: OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.merge(ca_file: '/etc/ca.pem', ssl_version: 'TLSv1_2', cert: cert, key: key)
|
133
136
|
end
|
134
137
|
|
135
138
|
it 'does not pass nil or blank values' do
|
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.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ping Yu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
requirements: []
|
174
174
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.
|
175
|
+
rubygems_version: 2.6.14.3
|
176
176
|
signing_key:
|
177
177
|
specification_version: 4
|
178
178
|
summary: A LDAP strategy for OmniAuth.
|