restful_authentication plugin and http_basic problem.

10 views
Skip to first unread message

Matthew Carriere

unread,
Aug 10, 2008, 4:27:41 AM8/10/08
to Ruby on Rails: Talk
So I installed the most recent restful_authentication plugin from
github and ran into a frustrating problem... on Internet Explorer 6
and 7 I received a security dialog box rather than seeing the login
view. When I clicked logout I received the same dialog.

I came across some posts on the web that led me to remove the
following line (73: authenticated_system.rb)

request_http_basic_authentication 'Web Password'

That worked for the login view, but logout still showed the dialog. So
I removed the format block around it:

format.any do
request_http_basic_authentication 'Web Password'
end

Now everything is working! :)

However, I would like to understand what is happening here and WHY
this worked. Anyone have any thoughts?

Rick Olson

unread,
Aug 10, 2008, 3:51:44 PM8/10/08
to Ruby on Rails: Talk


On Aug 10, 1:27 am, Matthew Carriere <matthew.carri...@gmail.com>
wrote:
> So I installed the most recent restful_authentication plugin from
> github and ran into a frustrating problem... on Internet Explorer 6
> and 7 I received a security dialog box rather than seeing the login
> view. When I clicked logout I received the same dialog.
>
> I came across some posts on the web that led me to remove the
> following line (73: authenticated_system.rb)
>
> request_http_basic_authentication 'Web Password'
>
> That worked for the login view, but logout still showed the dialog. So
> I removed the format block around it:
>
> format.any do
> request_http_basic_authentication 'Web Password'
> end
>
> Now everything is working! :)


Sometimes IE sends back a blank HTTP Accept header, and it triggers
the 'format.any' block as opposed to 'format.html'. Try changing it
to 'format.any(:xml, :json)' instead. That way it's only triggered
for those two formats.
Reply all
Reply to author
Forward
0 new messages