instance method
http_basic_authenticate_with
Ruby on Rails 4.0.13
Since v3.1.12Signature
http_basic_authenticate_with(options = {})
No documentation comment.
Parameters
-
optionsopt = {}
Source
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 70
def http_basic_authenticate_with(options = {})
before_action(options.except(:name, :password, :realm)) do
authenticate_or_request_with_http_basic(options[:realm] || "Application") do |name, password|
name == options[:name] && password == options[:password]
end
end
end
Defined in actionpack/lib/action_controller/metal/http_authentication.rb line 70
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods