Skip to content
Browse files

removed debugger and cleaned up login

  • Loading branch information...
1 parent 72a1aee commit 0234181349e4316d5cbcc0a961124ee5f6f421f7 @cschiewek cschiewek committed
Showing with 5 additions and 5 deletions.
  1. +1 −1 VERSION
  2. +1 −1 devise_ldap_authenticatable.gemspec
  3. +3 −3 lib/devise_ldap_authenticatable/ldap_adapter.rb
View
2 VERSION
@@ -1 +1 @@
-0.1.5
+0.1.6
View
2 devise_ldap_authenticatable.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{devise_ldap_authenticatable}
- s.version = "0.1.5"
+ s.version = "0.1.6"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Curtis Schiewek"]
View
6 lib/devise_ldap_authenticatable/ldap_adapter.rb
@@ -7,8 +7,9 @@ module Devise
module LdapAdapter
def self.valid_credentials?(login, attributes, password)
- debugger
- login = [::Devise.ldap_login_attribute+'='+login, attributes,::Devise.ldap_base_dn].join(',')
+ login = "#{::Devise.ldap_login_attribute}=#{login},"
+ login += "#{attributes}," unless attributes.nil?
+ login += ::Devise.ldap_base_dn
@encryption = ::Devise.ldap_ssl ? :simple_tls : nil
ldap = Net::LDAP.new(:encryption => @encryption)
ldap.host = ::Devise.ldap_host
@@ -17,7 +18,6 @@ def self.valid_credentials?(login, attributes, password)
if ldap.bind
true
else
- # errors.add_to_base(ldap.get_operation_result.message)
false
end
end

0 comments on commit 0234181

Please sign in to comment.
Something went wrong with that request. Please try again.