Method: ActionController::HttpAuthentication::Basic#authentication_request
- Defined in:
- lib/action_controller/metal/http_authentication.rb
#authentication_request(controller, realm) ⇒ Object
144 145 146 147 148 |
# File 'lib/action_controller/metal/http_authentication.rb', line 144 def authentication_request(controller, realm) controller.headers["WWW-Authenticate"] = %(Basic realm="#{realm.gsub(/"/, "")}") controller.response_body = "HTTP Basic: Access denied.\n" controller.status = 401 end |