Sha256: 630937eaa3c53fa4858031604b8f7e608c2c388f9d97a66d3867b58166f75b50

Contents?: true

Size: 1.34 KB

Versions: 1

Compression:

Stored size: 1.34 KB

Contents

module Adhearsion
  module LDAP

    ##
    # Adhearsion Plugin that defines the LDAP configuration options
    # and includes a hook to start the LDAP service in Adhearsion initialization process
    class Plugin < Adhearsion::Plugin
      extend ActiveSupport::Autoload

      autoload :Service

      # Default configuration for LDAP connection.
      # Configure an LDAP connection using ActiveLdap.  See ActiveLdap::Base.establish_connect
      # for further information about the appropriate settings here.
      config :adhearsion_ldap do
        host                 nil, :desc => "LDAP server host"
        port                 389, :desc => "LDAP server port"
        base                  "", :desc => <<-__
          LDAP tree that must be used in the connection
        __
        bind_dn               "", :desc => <<-__
          Specific domain name that identifies the user
        __
        password              "", :desc => "Password credentials"
        allow_anonymous    false, :desc => "valid values: true | false (default)"
        try_sasl           false, :desc => "valid values: true | false (default)"
        models "app/ldap_models", :desc => "directory containing ActiveLdap models"
      end

      # Include the LDAP service in plugins initialization process
      init :adhearsion_ldap do
        Service.start
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adhearsion-ldap-0.1.0 lib/adhearsion/ldap/plugin.rb