blueauth 0.0.9 → 0.0.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 549b103ab3916c49f5b02fdeab980a9f5ffe377d
4
- data.tar.gz: eb5b16e94d4c2d67fe70bc694645b6b2dd7b083c
3
+ metadata.gz: d43f780a0b6f124b426f1e3996491c7f5499184b
4
+ data.tar.gz: edc0da9ca9d17ba4ed9435adce580bf7f4f24de2
5
5
  SHA512:
6
- metadata.gz: bdc004b49b6b64b798be4739c34a36c585d95730adce06a5ee9e9679b336199fb90626d998cf6f739765cde35de0c431efb03494799b8e9008ebc2589da6e069
7
- data.tar.gz: 4825eea113602ae195556f86dedb52e35325f088644a00ce58bba4110c3d757ee36a11d664e260ab0a73f3dadcef1059e245519f70e75ee7fe17469ecd1562a3
6
+ metadata.gz: c9c6a298798d093d875657426d90ad6ec779b1bdfebd0c2adf33b23a2fe4b2c5cb9e043ec5567e4a7ddf715a62cca48753eeec0739d2fa75eec41fb674dfd113
7
+ data.tar.gz: f6e1250e7db720a4e56b5738b0bc0be02409efad2a29a9f39c61740ed22c7a1054aed50cf9aacb9f750e2cb64c36d87606b6fc6df7e0f2740041814304961170
@@ -4,11 +4,11 @@ require 'net-ldap'
4
4
 
5
5
  module Blueauth
6
6
 
7
- BPHOST = 'bluepages.ibm.com'
8
- BGHOST = 'bluegroups.ibm.com'
9
7
  BPBASE = 'ou=bluepages,o=ibm.com'
10
8
  BGBASE = 'ou=memberlist,ou=ibmgroups,o=ibm.com'
11
9
 
10
+ BPHOSTS = [['9.57.182.78',636], ['9.17.186.253',636], ['bluepages.ibm.com',636]]
11
+
12
12
  old_verbose, $VERBOSE = $VERBOSE, nil
13
13
  Net::LDAP::LDAPControls::PAGED_RESULTS = FALSE
14
14
  $VERBOSE = old_verbose
@@ -16,7 +16,7 @@ module Blueauth
16
16
  # using this method a user can be authenticated
17
17
  # Intraned ID, password are mandatory
18
18
  def self.authenticate(id, password)
19
- ldap = Net::LDAP.new host: BPHOST, port: 636, base: BPBASE, :encryption => :simple_tls
19
+ ldap = Net::LDAP.new hosts: BPHOSTS, base: BPBASE, :encryption => { :method => :simple_tls }#, :tls_options => { :verify_mode => OpenSSL::SSL::VERIFY_NONE } }
20
20
  user = search id.strip
21
21
  unless user.nil?
22
22
  ldap.auth user[:dn], password.strip
@@ -42,7 +42,6 @@ module Blueauth
42
42
  # return object contains
43
43
  # :name, :country, :intranetid, :dn
44
44
  def self.search(id)
45
- ldap = Net::LDAP.new host: BPHOST, port: 636, base: BPBASE, :encryption => :simple_tls
46
45
  if id.include? '@'
47
46
  searchfield = 'mail'
48
47
  elsif id.include? '/'
@@ -67,6 +66,7 @@ module Blueauth
67
66
  end
68
67
  filter = Net::LDAP::Filter.eq(searchfield, id) & Net::LDAP::Filter.eq('objectclass', "ibmPerson")
69
68
  begin
69
+ ldap = Net::LDAP.new hosts: BPHOSTS, base: BPBASE, :encryption => { :method => :simple_tls }#, :tls_options => { :verify_mode => OpenSSL::SSL::VERIFY_NONE } }
70
70
  user_array = ldap.search(base: BPBASE, filter: filter, size: 1)
71
71
  rescue => e
72
72
  raise Blueauth::BlueError, "BluePages Search issue -> #{e.message}"
@@ -83,7 +83,7 @@ module Blueauth
83
83
 
84
84
  def self.bluegroups(dn)
85
85
  result = []
86
- bg = Net::LDAP.new host: BPHOST, port: 636, base: BGBASE, :encryption => :simple_tls
86
+ bg = Net::LDAP.new hosts: BPHOSTS, base: BGBASE, :encryption => { :method => :simple_tls }#, :tls_options => { :verify_mode => OpenSSL::SSL::VERIFY_NONE } }
87
87
  bgf = Net::LDAP::Filter.eq('uniquemember', dn)
88
88
  begin
89
89
  bgres = bg.search(base: BGBASE, filter: bgf, attributes: ['cn'])
@@ -1,3 +1,3 @@
1
1
  module Blueauth
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blueauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - zoltan-izso
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-26 00:00:00.000000000 Z
11
+ date: 2017-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ldap
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.6.8
111
+ rubygems_version: 2.6.7
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Bluepages Authentication for IBMers within IBM's Intranet