ku-ldap 0.0.1 → 0.0.2
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.
- data/README.md +1 -1
- data/lib/ku/ldap/version.rb +1 -1
- data/lib/ku/ldap.rb +10 -11
- metadata +58 -32
data/README.md
CHANGED
data/lib/ku/ldap/version.rb
CHANGED
data/lib/ku/ldap.rb
CHANGED
@@ -7,39 +7,38 @@ require_relative 'ldap/version'
|
|
7
7
|
module KU
|
8
8
|
module LDAP
|
9
9
|
extend self
|
10
|
-
|
10
|
+
|
11
11
|
HOST = ENV['KU_LDAP_HOST']
|
12
12
|
PORT = ENV['KU_LDAP_PORT']
|
13
|
-
|
13
|
+
|
14
14
|
def user id, user_class=Entry::User
|
15
15
|
user_class.first directory, id
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
def users attribute, value, matcher=:contains, user_class=Entry::User
|
19
19
|
user_class.search directory, attribute.to_sym, value, matcher
|
20
20
|
end
|
21
|
-
|
22
|
-
def
|
21
|
+
|
22
|
+
def authenticate id, password, user_class=Entry::User
|
23
23
|
user_class.authenticate directory, id, password
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def group id, group_class=Entry::Group
|
27
27
|
group_class.first directory, id
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
def groups attribute, value, matcher=:contains, group_class=Entry::Group
|
31
31
|
group_class.search directory, attribute.to_sym, value, matcher
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
private
|
35
|
-
|
35
|
+
|
36
36
|
def directory
|
37
37
|
Directory.new service
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
def service
|
41
41
|
Net::LDAP.new(host: HOST, port: PORT, encryption: :start_tls)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
45
|
-
|
metadata
CHANGED
@@ -2,31 +2,31 @@
|
|
2
2
|
name: ku-ldap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- jamiehodge
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-04-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
prerelease: false
|
16
|
-
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
17
|
requirements:
|
19
18
|
- - ! '>='
|
20
19
|
- !ruby/object:Gem::Version
|
21
20
|
version: '0'
|
22
21
|
none: false
|
23
|
-
|
22
|
+
type: :runtime
|
23
|
+
name: net-ldap
|
24
|
+
requirement: !ruby/object:Gem::Requirement
|
24
25
|
requirements:
|
25
26
|
- - ! '>='
|
26
27
|
- !ruby/object:Gem::Version
|
27
28
|
version: '0'
|
28
29
|
none: false
|
29
|
-
name: net-ldap
|
30
30
|
description: A client for the Copenhagen University LDAP service.
|
31
31
|
email:
|
32
32
|
- jamiehodge@me.com
|
@@ -34,26 +34,46 @@ executables: []
|
|
34
34
|
extensions: []
|
35
35
|
extra_rdoc_files: []
|
36
36
|
files:
|
37
|
-
-
|
38
|
-
|
39
|
-
-
|
40
|
-
|
41
|
-
-
|
42
|
-
|
43
|
-
-
|
44
|
-
|
45
|
-
-
|
46
|
-
|
47
|
-
-
|
48
|
-
|
49
|
-
-
|
50
|
-
|
51
|
-
-
|
52
|
-
|
53
|
-
-
|
54
|
-
|
55
|
-
-
|
56
|
-
|
37
|
+
- !binary |-
|
38
|
+
LmdpdGlnbm9yZQ==
|
39
|
+
- !binary |-
|
40
|
+
R2VtZmlsZQ==
|
41
|
+
- !binary |-
|
42
|
+
TElDRU5TRQ==
|
43
|
+
- !binary |-
|
44
|
+
UkVBRE1FLm1k
|
45
|
+
- !binary |-
|
46
|
+
UmFrZWZpbGU=
|
47
|
+
- !binary |-
|
48
|
+
a3UtbGRhcC5nZW1zcGVj
|
49
|
+
- !binary |-
|
50
|
+
bGliL2t1L2xkYXAucmI=
|
51
|
+
- !binary |-
|
52
|
+
bGliL2t1L2xkYXAvZGlyZWN0b3J5LnJi
|
53
|
+
- !binary |-
|
54
|
+
bGliL2t1L2xkYXAvZW50cnkucmI=
|
55
|
+
- !binary |-
|
56
|
+
bGliL2t1L2xkYXAvZW50cnkvYmFzZS5yYg==
|
57
|
+
- !binary |-
|
58
|
+
bGliL2t1L2xkYXAvZW50cnkvZ3JvdXAucmI=
|
59
|
+
- !binary |-
|
60
|
+
bGliL2t1L2xkYXAvZW50cnkvdXNlci5yYg==
|
61
|
+
- !binary |-
|
62
|
+
bGliL2t1L2xkYXAvZmlsdGVyLnJi
|
63
|
+
- !binary |-
|
64
|
+
bGliL2t1L2xkYXAvdmVyc2lvbi5yYg==
|
65
|
+
- !binary |-
|
66
|
+
c3BlYy9rdS9sZGFwL2RpcmVjdG9yeV9zcGVjLnJi
|
67
|
+
- !binary |-
|
68
|
+
c3BlYy9rdS9sZGFwL2VudHJ5L2Jhc2Vfc3BlYy5yYg==
|
69
|
+
- !binary |-
|
70
|
+
c3BlYy9rdS9sZGFwL2VudHJ5L2dyb3VwX3NwZWMucmI=
|
71
|
+
- !binary |-
|
72
|
+
c3BlYy9rdS9sZGFwL2VudHJ5L3VzZXJfc3BlYy5yYg==
|
73
|
+
- !binary |-
|
74
|
+
c3BlYy9rdS9sZGFwX3NwZWMucmI=
|
75
|
+
- !binary |-
|
76
|
+
c3BlYy9zcGVjX2hlbHBlci5yYg==
|
57
77
|
homepage: ''
|
58
78
|
licenses: []
|
59
79
|
post_install_message:
|
@@ -79,9 +99,15 @@ signing_key:
|
|
79
99
|
specification_version: 3
|
80
100
|
summary: A client for the Copenhagen University LDAP service.
|
81
101
|
test_files:
|
82
|
-
-
|
83
|
-
|
84
|
-
-
|
85
|
-
|
86
|
-
-
|
87
|
-
|
102
|
+
- !binary |-
|
103
|
+
c3BlYy9rdS9sZGFwL2RpcmVjdG9yeV9zcGVjLnJi
|
104
|
+
- !binary |-
|
105
|
+
c3BlYy9rdS9sZGFwL2VudHJ5L2Jhc2Vfc3BlYy5yYg==
|
106
|
+
- !binary |-
|
107
|
+
c3BlYy9rdS9sZGFwL2VudHJ5L2dyb3VwX3NwZWMucmI=
|
108
|
+
- !binary |-
|
109
|
+
c3BlYy9rdS9sZGFwL2VudHJ5L3VzZXJfc3BlYy5yYg==
|
110
|
+
- !binary |-
|
111
|
+
c3BlYy9rdS9sZGFwX3NwZWMucmI=
|
112
|
+
- !binary |-
|
113
|
+
c3BlYy9zcGVjX2hlbHBlci5yYg==
|