I am trying to use jcouchdb api for authenticating against my couchdb
instance(0.11). I have set the admin usr/pass in futon and in addition
specified ADMIN and READER on the DB I am trying to access so only people
with correct credentials can access/view the DB.

My code is pretty simple and directly using ServerImpl and its
setCredentials and get method:

-------------------------
ServerImpl service = new ServerImpl("localhost");
        Credentials credentials =
                new UsernamePasswordCredentials(<usr>, <pass>);
        AuthScope authScope = new AuthScope("http://localhost";, 5984);

        service.setCredentials(authScope, credentials);

        Response res = service.get(/<database>);
-----------------------------

But everytime I do this, I keep getting http 401 in my response. Is there
something I am missing or not setting correctly?

I know its not exactly a couchdb question but there is very little to no
documentation available so thought I ll try here.

Thanks!

Reply via email to