Skip to content
Browse files

Dont call authenticate_or_request_with_http_basic twice

  • Loading branch information...
1 parent 52351bc commit e8d20b858d004e26c3b8c25aae099fce2eca6857 @dhh dhh committed Mar 29, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 actionpack/lib/action_controller/metal/http_authentication.rb
View
6 actionpack/lib/action_controller/metal/http_authentication.rb
@@ -110,10 +110,8 @@ module ControllerMethods
module ClassMethods
def http_basic_authenticate_with(options = {})
before_filter(options.except(:name, :password, :realm)) do
- authenticate_or_request_with_http_basic(options[:realm] || "Application") do
- authenticate_or_request_with_http_basic do |name, password|
- name == options[:name] && password == options[:password]
- end
+ authenticate_or_request_with_http_basic(options[:realm] || "Application") do |name, password|
+ name == options[:name] && password == options[:password]
end
end
end

0 comments on commit e8d20b8

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