couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Telmo González Michelena <telmogmichel...@gmail.com>
Subject Fwd: Basic authentication on CouchDB
Date Tue, 10 Sep 2013 19:29:14 GMT
Hi all,

I am trying to figure out how to use basic authentication (i.e. *
http://test:test@localhost:5984/mydb*) in CouchDB 1.3.1.

In the Futon:

 - I create a database *mydb*
 - I setup two users for it. In Security tab: one member with read
access *["test"]
*and one admin *["admin"]*

Then i just test connection.

Using curl:

*    curl GET http://localhost:5984/mydb*

returns 401 unauthorized, that's good.

*    curl GET http://test:test@localhost:5984/mydb*

returns 200, so everything works as expected using curl.

Using browser or $.ajax:

Both return 401 on the url http://test:test@localhost:5984/mydb.

So, questions:

 - What is the difference between using curl GET or usign $.ajax GET (or
browser)?
 - Am i missing some configuration in CouchDB or somewhere else that allows
to perform this kind of authentication?

Thanks in advance, Telmo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message