module ActionController::HttpAuthentication::Basic::ControllerMethods

def authenticate_or_request_with_http_basic(realm = "Application", &login_procedure)

def authenticate_or_request_with_http_basic(realm = "Application", &login_procedure)
  authenticate_with_http_basic(&login_procedure) || request_http_basic_authentication(realm)
end

def authenticate_with_http_basic(&login_procedure)

def authenticate_with_http_basic(&login_procedure)
  HttpAuthentication::Basic.authenticate(request, &login_procedure)
end

def request_http_basic_authentication(realm = "Application")

def request_http_basic_authentication(realm = "Application")
  HttpAuthentication::Basic.authentication_request(self, realm)
end