Skip to content

adhearsion/adhearsion-ldap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adhearsion-ldap

adhearsion-ldap is an Adhearsion Plugin providing LDAP connectivity based on ActiveLdap.

Features

  • Allows mapping LDAP objects into Adhearsion using ActiveRecord-like syntax.

Requirements

  • 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

Install

Add this to your Adhearsion app's Gemfile.

gem 'adhearsion', '~> 2.0'
gem 'ruby-ldap', platform: 'ruby'

Configuration

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.

Example

class Extension < ActiveLdap::Base
  ldap_mapping :dn_attribute => 'uid', :prefix => 'ou=Extensions', :classes => ['top', 'AsteriskUser', 'AsteriskVoiceMail']
end

Links

Note on Patches/Pull Requests

  • 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.

Copyright

Check License file

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages