Source

ruby-ldap /

Filename Size Date modified Message
doc
example/cgi
lib/ldap
test
win
10.2 KB
FAQ
655 B
600 B
7.5 KB
7.6 KB
149 B
26.4 KB
3.2 KB
6.8 KB
1.1 KB
12.6 KB
8.5 KB
708 B
5.0 KB
5.2 KB
2.2 KB
5.9 KB
                 Ruby/LDAP -- ruby extension library for LDAP                  
                                                                               
     Copyright (C) 2000,2001,2002 Takaaki Tateishi <ttate@kt.jaist.ac.jp>      
-------------------------------------------------------------------------------

DESCRIPTION

'Ruby/LDAP' is a ruby extension library which provides the interface to LDAP
API described in RFC1823.
-------------------------------------------------------------------------------

REQUIREMENT

  * Ruby 1.6.0 or later
  * OpenLDAP, NetscapeSDK, Windows2000(or ADSI)

-------------------------------------------------------------------------------

PORTS

  * FreeBSD ("Akinori -Aki- MUSHA" <knu@idaemons.org>)
  * Debian (Akira Yamada <akira@ruby-lang.org>)

-------------------------------------------------------------------------------

BUILDING

extconf.rb try to use OpenLDAP2 or NetscapeSDK libraries, and guess paths to
some header files and libraries from the position of 'ldap.h'. If you'd like to
see available options for extconf.rb, run it with '--help' option.

    $ ruby extconf.rb [--with-openldap1|--with-openldap2|--with-netscape|--with-wldap32]
    $ make

you will get 'ldap.so', and copy it to somewhere you like or do 'make install'.

If you has a binary distribution, execute install.rb as follows:

    $ ruby install.rb

-------------------------------------------------------------------------------

LICENSE

BSD License
-------------------------------------------------------------------------------

AVAILABLE CLASSES and METHODS

     LDAP::LDAP_VERSION
     LDAP::LDAP_MAX_VERSION
     LDAP::VERSION
     LDAP::MAJOR_VERSION
     LDAP::MINOR_VERSION
     LDAP::LDAP_PORT
     LDAP::LDAPS_PORT
     LDAP::LDAP_API_INFO_VERSION
     LDAP::LDAP_VENDOR_NAME
     LDAP::LDAP_VENDOR_VERSION
     LDAP::LDAP_API_VERSION
     LDAP.err2string(errcode)
     LDAP.dn2ufn(dn)
     LDAP.mod(mod_op, mod_type, mod_vals) (= LDAP::Mod.new)
     LDAP.hash2mods(mod_op, hash)
     LDAP.entry2hash(entry) (= entry.to_hash)
     LDAP::Conn.new(host = "localhost", port = LDAP::LDAP_PORT)
                    : conn (raise LDAP::Error)
     LDAP::Conn.open(host = "localhost", port = LDAP::LDAP_PORT)
                    : conn (raise LDAP::Error)
     LDAP::Conn#simple_bind(dn = nil, password = nil){ ... }
                    : conn (raise LDAP::ResultError)
     LDAP::Conn#bind(dn = nil, password = nil,
                     method = LDAP::LDAP_AUTH_SIMPLE){|conn| ... }
                     (raise LDAP::ResultError)
     LDAP::Conn#bind(dn = nil, password = nil,
                     method = LDAP::LDAP_AUTH_SIMPLE) : conn
                     (raise LDAP::ResultError)
     LDAP::Conn#unbind() (raise LDAP::ResultError)
     LDAP::Conn#perror(str)
     LDAP::Conn#result2error(ldap_msg) : errcode
     LDAP::Conn#err2string(errcode) : errmsg
     LDAP::Conn#get_errno : errcode [if available]
     LDAP::Conn#search(basedn, scope, filter, attrs = nil, attrsonly = false,
                       sec = 0, usec = 0, s_attr = nil, s_proc = nil){|entry| ... }
                       : conn (raise LDAP::ResultError)
     LDAP::Conn#search2(basedn, scope, filter, attrs = nil, attrsonly = false,
                        sec = 0, usec = 0, s_attr = nil, s_proc = nil){|entry_as_hash| ... }
                       : conn (if a block is given) / Array of Hash (if no block is given)
                       (raise LDAP::ResultError)
     LDAP::Conn#search_ext(basedn, scope, filter, attrs = nil, attrsonly = false,
                           serverctrls, clientctrls, sec = 0, usec = 0,
                           s_attr = nil, s_proc = nil){|entry| ... }
                           : conn (raise LDAP::ResultError)
     LDAP::Conn#search_ext2(basedn, scope, filter, attrs = nil, attrsonly = false,
                            serverctrls, clientctrls, sec = 0, usec = 0,
                            s_attr = nil, s_proc = nil){|entry_as_hash| ... }
                            : conn (if a block is given) / Array of Hash (if no block is given)
                            (raise LDAP::ResultError)
     LDAP::Conn#add(dn, ldap_mods) : self (raise LDAP::ResultError)
     LDAP::Conn#add_ext(dn, ldap_mods, serverctrls, clientctrls)
                        : self (raise LDAP::ResultError)
     LDAP::Conn#modify(dn, ldap_mods) : self (raise LDAP::ResultError)
     LDAP::Conn#modify_ext(dn, ldap_mods, serverctrls, clientctrls)
                           : self (raise LDAP::ResultError)
     LDAP::Conn#modrdn(olddn, newdn, delete) : self (raise LDAP::ResultError)
     LDAP::Conn#delete(dn) : self (raise LDAP::ResultError)
     LDAP::Conn#delete(dn, serverctrls, clientctrls) : self (raise LDAP::ResultError)
     LDAP::Conn#set_option(opt, data) : self (raise LDAP::ResultError)
     LDAP::Conn#get_option(opt) : data (raise LDAP::ResultError)
     LDAP::Mod.new(mod_op, mod_type, mod_vals) : ldap_mod
     LDAP::Mod#mod_op : mod_op
     LDAP::Mod#mod_type : mod_type
     LDAP::Mod#mod_vals : mod_vals
     LDAP::Mod#mod_op=(mod_op)
     LDAP::Mod#mod_type=(mod_type)
     LDAP::Mod#mod_vals=(mod_vals)
     LDAP::Entry#get_dn : dn
     LDAP::Entry#get_values : vals
     LDAP::Entry#get_attributes : attrs
     LDAP::Entry#dn (= get_dn)
     LDAP::Entry#vals (= vals)
     LDAP::Entry#attrs (= get_attributes)
     LDAP::Entry#to_hash : Hash

In ldap/schema.rb:

     LDAP::Conn#schema(attrs = nil, sec = 0, usec = 0) : schema
     LDAP::Schema#must(oc) : attributes
     LDAP::Schema#may(oc)  : attributes
     LDAP::Schema#names(attr) : names

see also test/*.rb for examples.
-------------------------------------------------------------------------------

REFERENCES

  * T. Howes, M. Smith (University of Michigan): RFC1823, The LDAP Application
    Program Interface, August 1995
  * The OpenLDAP Project: OpenLDAP 2.0 Administrator's Guide, September 2000
  * T. Howes (University of Michigan): RFC1960, A String Representation of LDAP
    Search Filters, June 1996
  * M. Wahl, Critical Angle Inc, T. Hows, Netscape Communications Gorp., S.
    Kille, Isode Limited: Lightweight Directory Access Protocol (v3), December
    1997
  * M. Wahl, Critical Angle Inc., A. Coulbeck, Isode Inc., T. Howes, Netscape
    Communications Corp., S. Kille, Isode Limited: December 1997
  * M .Wahl, Critical Angle Inc., S. Kille, Isode Ltd., T. Howes, Netscape
    Communications Corp.: Lightweight Directory Access Protocol (v3): UTF-8
    String Representation of Distinguished Names, December 1997
  * T. Howes, Netscape Communications Gorp.: The String Representation of LDAP
    Search Filters, December 1997
  * F. Yergeau (Alis Technologies): RFC2279, UTF-8, a transformation format of
    ISO 10646, October 1998
  * Netscape Communications Corp.: Netscape Directory SDK
  * Luiz Ernesto Pinheiro Malere: LDAP Linux HOWTO, February 2000
  * Tim Howes, Mark Smith: Understanding and Deploying LDAP Directory Servers

Here are the URLs that contain usefull informations about LDAP:

  * University of Michigan
    http://www.umich.edu/~dirsvcs/ldap/
  * OpenLDAP Project
    http://www.openldap.org/
  * Netscape Communications
    http://developer.netscape.com/docs/manuals/communicator/ldap45.htm
  * Netscape Directory SDK
    http://www.mozilla.org/directory/
  * Active Directory Service Interfaces Overview
    http://www.microsoft.com/windows2000/techinfo/howitworks/activedirectory/
    adsilinks.asp
  * LDAP schema repository
    http://www.hklc.com/ldapschema/
    http://ldap.hklc.com/
  * Object Identifiers Registry
    http://www.alvestrand.no/harald/objectid/