module ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods - actionpack-4.2.4 Documentation

# module ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods

### Public Instance Methods

http_basic_authenticate_with(options = {}) click to toggle source

    # File lib/action_controller/metal/http_authentication.rb, line 68
    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