Project

mit-ldap

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Ruby interface for querying MIT LDAP server (only if you're on MITnet)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0

Runtime

~> 0.2
~> 0.2
~> 0.9
 Project Readme

mit-ldap

Ruby wrapper for the MIT LDAP server. Can only be used if on the MIT campus network. Leverages tpope's wonderful Ldaptic

Installation:

gem 'mit-ldap'

Usage:

require 'mit-ldap'
MIT::LDAP.connect! # => true
MIT::LDAP.search(:filter => '(uid=mrhalp)') # => any Ldaptic options/methods

# if the connection fails or expires

MIT::LDAP.connected? # => false
MIT::LDAP.connect! # => true (re-establishes connection)

Stubbing out the LDAP server in development can be difficult as it requires setting up a private LDAP server or continuously being on campus for development. This library maintains the expected interface (logger, search) that can be faked in the event where the connection cannot be made or has failed and cannot be made again.