Skip to content

Commit

Permalink
removed debugger and cleaned up login
Browse files Browse the repository at this point in the history
  • Loading branch information
cschiewek committed Jul 22, 2010
1 parent 72a1aee commit 0234181
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Original file line Diff line number Diff line change
@@ -1 +1 @@
0.1.5 0.1.6
2 changes: 1 addition & 1 deletion devise_ldap_authenticatable.gemspec
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = %q{devise_ldap_authenticatable} 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.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Curtis Schiewek"] s.authors = ["Curtis Schiewek"]
Expand Down
6 changes: 3 additions & 3 deletions lib/devise_ldap_authenticatable/ldap_adapter.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ module Devise
module LdapAdapter module LdapAdapter


def self.valid_credentials?(login, attributes, password) def self.valid_credentials?(login, attributes, password)
debugger login = "#{::Devise.ldap_login_attribute}=#{login},"
login = [::Devise.ldap_login_attribute+'='+login, attributes,::Devise.ldap_base_dn].join(',') login += "#{attributes}," unless attributes.nil?
login += ::Devise.ldap_base_dn
@encryption = ::Devise.ldap_ssl ? :simple_tls : nil @encryption = ::Devise.ldap_ssl ? :simple_tls : nil
ldap = Net::LDAP.new(:encryption => @encryption) ldap = Net::LDAP.new(:encryption => @encryption)
ldap.host = ::Devise.ldap_host ldap.host = ::Devise.ldap_host
Expand All @@ -17,7 +18,6 @@ def self.valid_credentials?(login, attributes, password)
if ldap.bind if ldap.bind
true true
else else
# errors.add_to_base(ldap.get_operation_result.message)
false false
end end
end end
Expand Down

0 comments on commit 0234181

Please sign in to comment.