ldap_lookup 0.1.4 → 0.1.5
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/ldaptest.rb +4 -8
- data/lib/ldap_lookup.rb +5 -1
- data/lib/ldap_lookup/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c758df2ba4bd275893bab9423486dbf4c8befb3002a9bc480f4f2e4b5d465885
|
4
|
+
data.tar.gz: e6c69664b9b03a99725467988028c003e7610bcaaac0f5f0195fae4c19ca4ee5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 358f2ba236db3721236483e2017286d07ffad110f9a60946589d0ca20626d9829a970a9e9dabcd2a9243c3c8cd56a19ca0e8be5949983d1479fea77494e5adc0
|
7
|
+
data.tar.gz: 3bc39049501bbab4f7751269c7a5ef12262bd5752c27f38b349ec1171393fe5397d5511ef3ef77e12dc870af6aa12e178b082b433a0abe6545360330aa26a181
|
data/ldaptest.rb
CHANGED
@@ -7,14 +7,10 @@ class Ldaptest
|
|
7
7
|
|
8
8
|
############## CONFIGURATION BLOCK ###################
|
9
9
|
LdapLookup.configuration do |config|
|
10
|
-
config.host = "
|
11
|
-
config.base = "
|
12
|
-
config.dept_attribute = "umichPostalAddressData"
|
13
|
-
|
14
|
-
# config.base = "dc=umich,dc=edu" #OU=UMICH,DC=adsroot,DC=itcs,DC=umich,DC=edu
|
15
|
-
# config.dept_attribute = "umichPostalAddressData" #sAMAccountName
|
16
|
-
# config.group_attribute = "umichGroupEmail"
|
17
|
-
# config.group_attribute = "umichGroupEmail"
|
10
|
+
config.host = "ldap.umich.edu"
|
11
|
+
config.base = "dc=umich,dc=edu"
|
12
|
+
config.dept_attribute = "umichPostalAddressData"
|
13
|
+
config.group_attribute = "umichGroupEmail"
|
18
14
|
end
|
19
15
|
#######################################################
|
20
16
|
|
data/lib/ldap_lookup.rb
CHANGED
@@ -53,7 +53,11 @@ module LdapLookup
|
|
53
53
|
search_filter = Net::LDAP::Filter.eq("uid", search_param)
|
54
54
|
# Execute search
|
55
55
|
ldap.search(filter: search_filter, attributes: result_attrs) { |item|
|
56
|
-
|
56
|
+
begin
|
57
|
+
return item.displayName.first
|
58
|
+
rescue
|
59
|
+
return "not available"
|
60
|
+
end
|
57
61
|
}
|
58
62
|
get_ldap_response(ldap)
|
59
63
|
end
|
data/lib/ldap_lookup/version.rb
CHANGED