1- It is with great excitement that I announce the first release of the pure
2- Ruby LDAP library, Net::LDAP.
1+ We're pleased to announce the first release of Net::LDAP, the first
2+ pure-Ruby LDAP library. Net::LDAP intends to be a feature-complete
3+ LDAP client which can access as much as possible of the functionality
4+ of the most-used LDAP server implementations.
5+
6+ Net::LDAP includes a full implementation of the LDAP wire-line
7+ protocol so it can also be used in LDAP server implementations.
8+
9+ Thanks for Austin Ziegler for invaluable help in reviewing the
10+ implementation and providing the release structure.
311
412= What is Net::LDAP for Ruby?
5- [...]
13+ This library provides a pure-Ruby implementation of an LDAP client.
14+ It can be used to access any server which implements the LDAP protocol.
15+
16+ Net::LDAP is intended to provide full LDAP functionality while hiding
17+ the more arcane aspects of the LDAP protocol itself, so as to make the
18+ programming interface as Ruby-like as possible.
19+
20+ In particular, this means that there is no direct dependence on the
21+ structure of the various "traditional" LDAP clients. This is a ground-up
22+ rethinking of the LDAP API.
23+
24+ Net::LDAP is based on RFC-1777, which specifies the Lightweight Directory
25+ Access Protocol, as amended and extended by subsequent RFCs and by the more
26+ widely-used directory implementations.
627
728Homepage:: http://ruby-pdf.rubyforge.org/net-ldap/
829Download:: http://rubyforge.org/frs/?****
930Copyright:: 2006 Francis Cianfrocca
1031
11- This software is based on RFC***, describing the Lightweight Directory
12- Access Protocol.
13-
1432== LICENCE NOTES
15- [...]
33+ Please read the file LICENCE for licensing restrictions on this library. In
34+ the simplest terms, this library is available under the same terms as Ruby
35+ itself.
1636
1737== Requirements and Installation
1838Net::LDAP requires Ruby 1.8.2 or better.
@@ -25,7 +45,30 @@ Alternatively, you can use the RubyGems version of Net::LDAP available
2545as ruby-net-ldap-0.0.1.gem from the usual sources.
2646
2747== Whet your appetite:
28- [...]
48+ require 'net/ldap'
49+
50+ ldap = Net::LDAP.new :host => server_ip_address,
51+ :port => 389,
52+ :auth => {
53+ :method => :simple,
54+ :username => "cn=manager,dc=example,dc=com",
55+ :password => "opensesame"
56+ }
57+
58+ filter = Net::LDAP::Filter.eq( "cn", "George*" )
59+ treebase = "dc=example,dc=com"
60+
61+ ldap.search( :base => treebase, :filter => filter ) do |entry|
62+ puts "DN: #{entry.dn}"
63+ entry.each do |attribute, values|
64+ puts " #{attribute}:"
65+ values.each do |value|
66+ puts " --->#{value}"
67+ end
68+ end
69+ end
70+
71+ p ldap.get_operation_result
2972
3073== Net::LDAP 0.0.1: April 30, 2006
3174[...]
0 commit comments