# Restful\_authentication - using http auth in IE

**URL:** <https://www.ruby-forum.com/t/restful-authentication-using-http-auth-in-ie/158530>\
**Category:** Rails\
**Created:** [January 24, 2009, 11:32am UTC](https://www.ruby-forum.com/t/restful-authentication-using-http-auth-in-ie/158530 "2009-01-24T11:32:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zero0x](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c6cbf5/32.png) [@zero0x](https://www.ruby-forum.com/u/zero0x)\
**Post date:** [January 24, 2009, 11:32am UTC](https://www.ruby-forum.com/t/restful-authentication-using-http-auth-in-ie/158530/1 "2009-01-24T11:32:04Z")

</div>

Hi,

my restful\_authentication plugin is always logging in using http auth.

But only in IE. In Safari/Firefox in displays a form.

Where do I tell it to use html login form?

---

<div class="post-metadata">

**Author:** ![zero0x](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c6cbf5/32.png) [@zero0x](https://www.ruby-forum.com/u/zero0x)\
**Post date:** [January 25, 2009, 11:25pm UTC](https://www.ruby-forum.com/t/restful-authentication-using-http-auth-in-ie/158530/2 "2009-01-25T23:25:04Z")

</div>

I didn’t want http auth or cookie-based logins at all, so I modified  
the current\_user method in lib/authenticated\_system.rb like this:

```
def current_user
  # Original method allowed login from http authentication or

```

cookie, but we are disabling that.  
# @current\_user ||= (login\_from\_session || login\_from\_basic\_auth  
|| login\_from\_cookie) unless @current\_user == false  
@current\_user ||= login\_from\_session unless @current\_user ==  
false  
end

If you do make this change, be aware that if you install a newer  
version of restful\_authentication your modifications will be  
overwritten. That wasn’t an issue for me.

---

<div class="post-metadata">

**Author:** ![zero0x](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c6cbf5/32.png) [@zero0x](https://www.ruby-forum.com/u/zero0x)\
**Post date:** [January 27, 2009, 5:32am UTC](https://www.ruby-forum.com/t/restful-authentication-using-http-auth-in-ie/158530/3 "2009-01-27T05:32:00Z")

</div>

wierd that this happens in IE though, I had the same issue. Did you  
ever properly resolve it? We need http auth for API calls.

On Sun, Jan 25, 2009 at 5:24 PM, Chris B.
