| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Tue, 23 Dec 2025 07:52:38 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100605051204
location: https://web.archive.org/web/20100605051204/https://github.com/thoughtbot/ldap-activerecord-gateway
server-timing: captures_list;dur=0.969935, exclusion.robots;dur=0.122289, exclusion.robots.policy;dur=0.105797, esindex;dur=0.014608, cdx.remote;dur=28.952334, LoadShardBlock;dur=185.890991, PetaboxLoader3.datanode;dur=77.380808, PetaboxLoader3.resolve;dur=69.069335
x-app-server: wwwb-app28-dc8
x-ts: 302
x-tr: 251
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app28; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Tue, 23 Dec 2025 07:52:38 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Sat, 05 Jun 2010 05:12:04 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "234402ffb598dd3099106a3cf822fa70"
x-archive-orig-x-runtime: 51ms
x-archive-orig-content-length: 23602
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sat, 05 Jun 2010 05:12:04 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_16_20100605035439_crawl101-c/51_16_20100605050927_crawl101.arc.gz
server-timing: captures_list;dur=0.678678, exclusion.robots;dur=0.026222, exclusion.robots.policy;dur=0.015338, esindex;dur=0.011181, cdx.remote;dur=45.970620, LoadShardBlock;dur=208.843690, PetaboxLoader3.resolve;dur=168.199540, PetaboxLoader3.datanode;dur=144.343741, load_resource;dur=108.210873
x-app-server: wwwb-app28-dc8
x-ts: 200
x-tr: 455
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
thoughtbot's ldap-activerecord-gateway at master - GitHub
thoughtbot / ldap-activerecord-gateway
- Source
- Commits
- Network (4)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
tsaleh (author)
Thu Aug 09 07:11:55 -0700 2007
| name | age | message | |
|---|---|---|---|
| |
README | Thu Aug 09 07:11:55 -0700 2007 | fixed documentation git-svn-id: https://svn.th... [tsaleh] |
| |
Rakefile | Wed May 09 06:54:18 -0700 2007 | - Added tests - Large amount of refactoring ... [tsaleh] |
| |
bin/ | Wed May 09 06:54:18 -0700 2007 | - Added tests - Large amount of refactoring ... [tsaleh] |
| |
conf/ | Mon Nov 06 10:08:40 -0800 2006 | Cleaned up example configuration file. git-svn... [tsaleh] |
| |
lib/ | Wed May 16 08:12:58 -0700 2007 | debugging git-svn-id: https://svn.thoughtbot.c... [tsaleh] |
| |
test/ | Wed May 16 08:11:19 -0700 2007 | debugging git-svn-id: https://svn.thoughtbot.c... [tsaleh] |
README
ldap-activerecord-gateway
=========================
This is an implementation of an LDAP server which uses active record as the data source.
The server is read-only, and can serve information from any AR model that implements the
#search(string) class method and the #to_ldap_entry instance method.
To use, configure the server by creating a conf/ldap-server.yml file (see ldap-server.example.yml).
The important bits are rails_dir, active_record_model, basedn, and port. Once that's done,
run "./bin/ldap-server.rb start", wait for it to daemonize, and check the log file under $RAILS_ROOT/log/ for
errors. To stop, run "./bin/ldap-server.rb", and if you reconfigure the server or change the underlying
AR model, restart it with "./bin/ldap-server.rb restart".
To test, point your addressbook (ie: Thunderbird or OS X Address Book) at the server and run a search.
Example AR class:
class Person < ActiveRecord::Base
def fullname
"#{firstname} #{lastname}"
end
def to_ldap_entry
{
"objectclass" => ["top", "person", "organizationalPerson", "inetOrgPerson", "mozillaOrgPerson"],
"uid" => ["tbotter-#{id}"],
"sn" => [lastname],
"givenName" => [firstname],
"cn" => [fullname],
"title" => [title],
"o" => [company],
"mail" => [email],
"telephonenumber" => [work_phone],
"homephone" => [home_phone],
"fax" => [fax],
"mobile" => [mobile],
"street" => [address],
"l" => [city],
"st" => [state],
"postalcode" => [zip],
}
end
def self.search(query)
Person.find(:all,
:conditions => ["(email LIKE ?) OR (firstname LIKE ?) OR (lastname LIKE ?)",
"#{query}%", "#{query}%", "#{query}%"])
end
end
Have fun.
