Randy Girard

Restful Authentication and Basic HTTP Auth

I had an application that was prompting a HTTP Authentication box in IE after using the restful authentication plugin. The way I fixed it was to replace the access_denied method in lib/authenticated_system.rb to:

def access_denied
  respond_to do |format|
    format.any do
      #format.html do
      store_location
      redirect_to new_session_path
    end
    #format.any do
      #  request_http_basic_authentication 'Web Password'
    #end
  end
end

Noticed I commented some lines out. This was so that if i ever need to revert, the code will still be there and I wont have to go looking for it. Hope this helps!