adhearsion-ldap is an Adhearsion Plugin providing LDAP connectivity based on ActiveLdap.
- Allows mapping LDAP objects into Adhearsion using ActiveRecord-like syntax.
- Adhearsion 2.x
- ruby-ldap or net-ldap Must be installed manually
adhearsion-ldap uses ActiveLdap internally, which on CRuby can use either ruby-ldap or net-ldap. Since Gemfiles don't allow specifying dependencies like that, must manually install one or the other. See instructions below.
Note that the LDAP gem you choose may require development packages for the header files. You can get them like this:
# RHEL & CentOS
$ sudo yum install openldap-devel cyrus-sasl-devel
# Debian & Ubuntu
$ sudo apt-get install libldap2-dev libsasl2-dev
Add this to your Adhearsion app's Gemfile.
gem 'adhearsion', '~> 2.0'
gem 'ruby-ldap', platform: 'ruby'
In your Adhearsion app configuration file, add the following values:
Adhearsion.config do |config|
config.adhearsion_ldap.host = "ldap-server.example.com" # Defaults to port 389
config.adhearsion_ldap.base = "dc=example,dc=com"
config.adhearsion_ldap.bind_dn = "uid=Manager,dc=example,dc=com"
config.adhearsion_ldap.password = "secret"
end
As always, use rake config:show
to see the complete list of options.
class Extension < ActiveLdap::Base
ldap_mapping :dn_attribute => 'uid', :prefix => 'ou=Extensions', :classes => ['top', 'AsteriskUser', 'AsteriskVoiceMail']
end
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a future version unintentionally.
- Commit, do not mess with rakefile, version, or history.
- If you want to have your own version, that is fine but bump version in a commit by itself so I can ignore when I pull
- Send me a pull request. Bonus points for topic branches.
Check License file