blueauth 1.0.0 → 1.0.1

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: 8165645faa29f6da46652f30a954374db6a58b1d
4
- data.tar.gz: 1c8f22b04657dfdf1e67560ba22995a3b87f696a
3
+ metadata.gz: 19aa8ef8f3a1938410b9b54739f26a8b294fadf4
4
+ data.tar.gz: 6ae26dce201a9f71f1f1202ef443255c481d3e38
5
5
  SHA512:
6
- metadata.gz: 9f28eecefafbb396aecbb2890654401990581bbfc6037fea41fb76a8716238332d2e70e871f16b7f70dc131f971cfadd4fa4cfa8c548a03c667259090e6d01ac
7
- data.tar.gz: de90394c5e6e6cad96c24a75b11d1d7627efc29e762c205cba5b845382c1a5b7e45140896e4aaf163ee2d91d01df136442008e8a5bf538567a84787ce01a8f1f
6
+ metadata.gz: 1b88edc77486d08dfd7eca1b6051918671eae5aa97c6d4eeee7dabf5dfb2248dfce23e4ea934dc3e453e3f7b260e0a3c6681e13151bc67fa3680d85e8f168c70
7
+ data.tar.gz: 23a1f88a62fb95763e4542d68e5aa3a4ebd1d8b7284bc76b8f94f0b12307bdc93fb98f9bf191f5de7aff72a4a9e3f8ad3371556007ad024dfdbec7588eac8096
@@ -1,3 +1,6 @@
1
+ ## v1.0.1
2
+ ### Changes
3
+ * connect_timeout was at a wrong place (embedded in encryption)... now it's fixed
1
4
  ## v1.0.0
2
5
  ### Changes
3
6
  * Blueauth is a class now instead of a module
data/README.md CHANGED
@@ -1,58 +1,58 @@
1
- # Blueauth [![Build Status](https://travis.ibm.com/zoltan-izso/blueauth.svg?token=1KvVoceCxkmpqwi6KVNs&branch=master)](https://travis.ibm.com/zoltan-izso/blueauth)
2
-
3
- The purpose of this gem is to allow IBMers to search and authenticate user that are registered in IBM's Enterprise Directory. This gem can only be used in IBM's Intranet network. Every IBM employee can be searched based on his/her Intraned ID, or Notes ID, or Common name.
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'blueauth'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle install
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install blueauth
20
-
21
- ## Usage
22
-
23
- #### Search for a user if she/he exists in IBM's Enterprise Directory
24
-
25
- The userid can be Intranet ID or Notes ID or Common name
26
-
27
- blueauth = Blueauth.new
28
- blueauth.search 'istvan.kovacs@hu.ibm.com'
29
- blueauth.search 'Istvan Kovacs/Hungary/IBM'
30
- blueauth.search 'Istvan Kovacs'
31
-
32
- If the user is found, then the returned object will be a hash: {:name, :country, :intranetid, :dn}. If the user is not found, then nil
33
-
34
-
35
- #### Search for a user's Bluegroups
36
-
37
- First, the user must exist in Enterprise Directory, and the Bluegroup can be queried based on the DN of the user
38
-
39
- blueauth = Blueauth.new
40
- user = blueauth.search 'istvan.kovacs@hu.ibm.com'
41
- blueauth.bluegroups user[:dn]
42
-
43
- Returned object will be an Array of strings containing the names of Bluegroups where the user is assigned to.
44
-
45
- #### Authenticate a user with his/her password
46
-
47
- The userid can be Intranet ID or Notes ID or Common name
48
-
49
- blueauth = Blueauth.new
50
- blueauth.authenticate 'istvan.kovacs@hu.ibm.com', 'password'
51
- blueauth.authenticate 'Istvan Kovacs/Hungary/IBM', 'password'
52
- blueauth.authenticate 'Istvan Kovacs', 'password'
53
-
54
- If the user is found, then the returned object will be a hash: {:name, :country, :intranetid, :dn, :groups}. Groups is an array containing all Bluegroups. If the user is not found, then nil
55
-
56
- #### In case of any problem with LDAP server will throw an Exception
57
-
1
+ # Blueauth [![Build Status](https://travis.ibm.com/zoltan-izso/blueauth.svg?token=1KvVoceCxkmpqwi6KVNs&branch=master)](https://travis.ibm.com/zoltan-izso/blueauth)
2
+
3
+ The purpose of this gem is to allow IBMers to search and authenticate user that are registered in IBM's Enterprise Directory. This gem can only be used in IBM's Intranet network. Every IBM employee can be searched based on his/her Intraned ID, or Notes ID, or Common name.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'blueauth'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install blueauth
20
+
21
+ ## Usage
22
+
23
+ #### Search for a user if she/he exists in IBM's Enterprise Directory
24
+
25
+ The userid can be Intranet ID or Notes ID or Common name
26
+
27
+ blueauth = Blueauth.new
28
+ blueauth.search 'istvan.kovacs@hu.ibm.com'
29
+ blueauth.search 'Istvan Kovacs/Hungary/IBM'
30
+ blueauth.search 'Istvan Kovacs'
31
+
32
+ If the user is found, then the returned object will be a hash: {:name, :country, :intranetid, :dn}. If the user is not found, then nil
33
+
34
+
35
+ #### Search for a user's Bluegroups
36
+
37
+ First, the user must exist in Enterprise Directory, and the Bluegroup can be queried based on the DN of the user
38
+
39
+ blueauth = Blueauth.new
40
+ user = blueauth.search 'istvan.kovacs@hu.ibm.com'
41
+ blueauth.bluegroups user[:dn]
42
+
43
+ Returned object will be an Array of strings containing the names of Bluegroups where the user is assigned to.
44
+
45
+ #### Authenticate a user with his/her password
46
+
47
+ The userid can be Intranet ID or Notes ID or Common name
48
+
49
+ blueauth = Blueauth.new
50
+ blueauth.authenticate 'istvan.kovacs@hu.ibm.com', 'password'
51
+ blueauth.authenticate 'Istvan Kovacs/Hungary/IBM', 'password'
52
+ blueauth.authenticate 'Istvan Kovacs', 'password'
53
+
54
+ If the user is found, then the returned object will be a hash: {:name, :country, :intranetid, :dn, :groups}. Groups is an array containing all Bluegroups. If the user is not found, then nil
55
+
56
+ #### In case of any problem with LDAP server will throw an Exception
57
+
58
58
  Blueauth::BlueError
@@ -19,9 +19,8 @@ class Blueauth
19
19
  cert_store.add_cert OpenSSL::X509::Certificate.new(NEW_CERT)
20
20
  cert_store.add_cert OpenSSL::X509::Certificate.new(OLD_CERT)
21
21
 
22
- @ldap = Net::LDAP.new hosts: BPHOSTS, encryption: {
22
+ @ldap = Net::LDAP.new hosts: BPHOSTS, connect_timeout: 15, encryption: {
23
23
  method: :simple_tls,
24
- connect_timeout: 20,
25
24
  tls_options: {
26
25
  ssl_version: :TLSv1_2,
27
26
  verify_mode: OpenSSL::SSL::VERIFY_PEER,
@@ -1,3 +1,3 @@
1
- class Blueauth
2
- VERSION = "1.0.0"
3
- end
1
+ class Blueauth
2
+ VERSION = "1.0.1"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blueauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - zoltan-izso