Commit 6281b31aad80d19a55149cd1eefeed27615a1def

Authored by Nathan Broadbent
1 parent f462a777
Exists in master and in 1 other branch production

Added a guide for configuring LDAP authentication

Showing 1 changed file with 28 additions and 0 deletions   Show diff stats
README.md
... ... @@ -97,6 +97,34 @@ for you. Checkout [Hoptoad](http://hoptoadapp.com) from the guys over at
97 97  
98 98 4. Enjoy!
99 99  
  100 +
  101 +**Configuring LDAP authentication:**
  102 +
  103 + 1. Add the following line to Errbit's Gemfile:
  104 +
  105 + gem "devise_ldap_authenticatable", :git => "git://github.com/cschiewek/devise_ldap_authenticatable.git"
  106 +
  107 + 2. Install new dependencies
  108 +
  109 + bundle install
  110 +
  111 + 3. Run the rails generator for `devise_ldap_authenticatable`
  112 +
  113 + rails generate devise_ldap_authenticatable:install --advanced
  114 +
  115 + 4. Configure your LDAP settings in `config/initializers/devise.rb`.
  116 +
  117 + 5. If you want to authenticate via `username`, then add the following lines to `app/models/user.rb`:
  118 +
  119 + field :username
  120 + before_save :set_ldap_email
  121 + def set_ldap_email
  122 + self.email = Devise::LdapAdapter.get_ldap_param(self.username, "mail")
  123 + end
  124 +
  125 +To learn more, please follow the instructions at https://github.com/cschiewek/devise_ldap_authenticatable
  126 +
  127 +
100 128 Upgrading
101 129 ---------
102 130 *Note*: If upgrading from a version of Errbit that used Notices embedded in Errs please run:
... ...