Simple LDAP Authenticator plugin

Plugin details

Allows for simple authentication to an LDAP server with a minimum of configuration. Requires either Ruby/LDAP or Net::LDAP.

Websitehttp://code.jeremyevans.net/doc/simple_ldap_authenticator/ Repositorysvn://code.jeremyevans.net/rails/plugins/simple_ldap_authenticator Author Jeremy Evans Tags ldap, Auth LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install svn://code.jeremyevans.net/rails/plugins/simple_ldap_authenticator

Usage is fairly simple:

  require 'simple_ldap_authenticator'
  SimpleLdapAuthenticator.servers = %w'dc1.domain.com dc2.domain.com'
  SimpleLdapAuthenticator.use_ssl = true
  SimpleLdapAuthenticator.login_format = '%s @domain.com'
  SimpleLdapAuthenticator.logger = RAILS_DEFAULT_LOGGER
  class LoginController < ApplicationController
    def login
      return redirect_to(:action=>'try_again') unless \
        SimpleLdapAuthenticator.valid?(params[:username], \
        params[:password])  
      session[:username] = params[:username]
    end
  end

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 7 months ago