couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Basic authentication on CouchDB
Date Tue, 10 Sep 2013 20:16:07 GMT
Hi,

This is a user@ question. The dev@ mailing list is for developing couchdb itself. Please send
the question to our user mailing list and I'm sure you'll get some help with this issue.

Thanks,
B.

On 10 Sep 2013, at 20:29, Telmo González Michelena <telmogmichelena@gmail.com> wrote:

> 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
View raw message