Skip to content

Commit

Permalink
Dont call authenticate_or_request_with_http_basic twice
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Mar 29, 2011
1 parent 52351bc commit e8d20b8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions actionpack/lib/action_controller/metal/http_authentication.rb
Expand Up @@ -110,10 +110,8 @@ module ControllerMethods
module ClassMethods module ClassMethods
def http_basic_authenticate_with(options = {}) def http_basic_authenticate_with(options = {})
before_filter(options.except(:name, :password, :realm)) do before_filter(options.except(:name, :password, :realm)) do
authenticate_or_request_with_http_basic(options[:realm] || "Application") do authenticate_or_request_with_http_basic(options[:realm] || "Application") do |name, password|
authenticate_or_request_with_http_basic do |name, password| name == options[:name] && password == options[:password]
name == options[:name] && password == options[:password]
end
end end
end end
end end
Expand Down

0 comments on commit e8d20b8

Please sign in to comment.