# Http Basic Authentication and AJAX

**URL:** <https://www.ruby-forum.com/t/http-basic-authentication-and-ajax/147747>\
**Category:** Rails\
**Created:** [September 5, 2008, 12:08am UTC](https://www.ruby-forum.com/t/http-basic-authentication-and-ajax/147747 "2008-09-05T00:08:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bparanj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e9a140/32.png) [@bparanj](https://www.ruby-forum.com/u/bparanj)\
**Post date:** [September 5, 2008, 12:08am UTC](https://www.ruby-forum.com/t/http-basic-authentication-and-ajax/147747/1 "2008-09-05T00:08:57Z")

</div>

Does anyone know how to make AJAX calls to admin name spaced controllers  
that requires http basic authentication? TIA.

---

<div class="post-metadata">

**Author:** ![bparanj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e9a140/32.png) [@bparanj](https://www.ruby-forum.com/u/bparanj)\
**Post date:** [September 5, 2008, 12:11am UTC](https://www.ruby-forum.com/t/http-basic-authentication-and-ajax/147747/2 "2008-09-05T00:11:53Z")

</div>

If you already have HTTP auth working, the ajax calls should just  
work. If the client is not authenticated, a popup should appear asking  
him to give his credentials.

On Thu, Sep 4, 2008 at 7:08 PM, Bala P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Does anyone know how to make AJAX calls to admin name spaced controllers  
> that requires http basic authentication? TIA.  
> –~–~---------~–~----~------------~-------~–~----~

–  
Maurício Linhares  
[http://alinhavado.wordpress.com/](http://alinhavado.wordpress.com/) (pt-br) | [http://blog.codevader.com/](http://blog.codevader.com/)  
(en)  
João Pessoa, PB, +55 83 8867-7208

---

<div class="post-metadata">

**Author:** ![bparanj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e9a140/32.png) [@bparanj](https://www.ruby-forum.com/u/bparanj)\
**Post date:** [September 5, 2008, 12:13am UTC](https://www.ruby-forum.com/t/http-basic-authentication-and-ajax/147747/3 "2008-09-05T00:13:38Z")

</div>

The HTTP basic authentication is already working. But AJAX calls to  
those  
controller fails. Any pointers is appreciated. Thanks.

On Thu, Sep 4, 2008 at 3:11 PM, MaurÃ­cio Linhares \<  
removed\_email\_address@domain.invalid\> wrote:

> If you already have HTTP auth working, the ajax calls should just  
> work. If the client is not authenticated, a popup should appear asking  
> him to give his credentials.
> 
> On Thu, Sep 4, 2008 at 7:08 PM, Bala P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Does anyone know how to make AJAX calls to admin name spaced controllers  
> > that requires http basic authentication? TIA.
> > 
> > >

–  
[http://www.rubyplus.org/](http://www.rubyplus.org/)  
Free Ruby and Rails Screencasts

---

<div class="post-metadata">

**Author:** ![bparanj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e9a140/32.png) [@bparanj](https://www.ruby-forum.com/u/bparanj)\
**Post date:** [September 5, 2008, 12:17am UTC](https://www.ruby-forum.com/t/http-basic-authentication-and-ajax/147747/4 "2008-09-05T00:17:09Z")

</div>

[http://coderseye.com/2007/how-to-do-http-basic-auth-in-ajax.html](http://coderseye.com/2007/how-to-do-http-basic-auth-in-ajax.html)

On Thu, Sep 4, 2008 at 7:12 PM, Bala P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The HTTP basic authentication is already working. But AJAX calls to those  
> controller fails. Any pointers is appreciated. Thanks.

–  
Maurício Linhares  
[http://alinhavado.wordpress.com/](http://alinhavado.wordpress.com/) (pt-br) | [http://blog.codevader.com/](http://blog.codevader.com/)  
(en)  
João Pessoa, PB, +55 83 8867-7208
