Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A small tool used to lookup data information from an LDAP server
Ruby
tree: e632572872

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
README.markdown
ldap_lookup.gemspec

README.markdown

LDAP Lookup

A small gem used for looking up stuff from an LDAP server.

Example:

# ldap.yml
server:  localhost
port: 9999
base_dn: ou=Addressbook,dc=localhost,dc=local
fields:
  first_name: givenName
  last_name: sn
  email: mail

# ldap_user.rb
require 'yaml'
LDAPLookup::Importable.settings = YAML.load(File.read('./ldap.yml'))
class LdapUser
  include LDAPLookup::Importable

  attr_accessor :first_name, :last_name, :email
end

LdapUser.from_ldap(email: 'some.one@example.org')
 => #<LdapUser:0xdeadbeef @first_name="some", @last_name="one", @email="some.one@example.org">
Something went wrong with that request. Please try again.