Dont call authenticate_or_request_with_http_basic twice

上级 52351bcf
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册