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