lanto03 / couchdb-python

Automatically exported from code.google.com/p/couchdb-python
Other
0 stars 0 forks source link

Allow Basic Authentication on the Couch connection #80

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is an enhancement request to allow Basic Authentication to be added to
the API so the library can be used to connect to the Couch.io hosting service.

I have attached my own hacky attempt to implement it as a diff file.

Original issue reported on code.google.com by shudder...@gmail.com on 12 Jul 2009 at 10:41

Attachments:

GoogleCodeExporter commented 8 years ago
While I suppose it would be better to have this directly in the API, note that 
you can easily use credentials in 
the current version, for example:

    db = Database(dburl)
    if username is not None and password is not None:
        db.resource.http.add_credentials(username, password)

What would you think about simply parsing the creds out of the URL, if provided 
in the form 
http://username:password@example.org/ ?

Original comment by cmlenz on 13 Jul 2009 at 8:35

GoogleCodeExporter commented 8 years ago
That would work for me and I think it is elegant.

Original comment by shudder...@gmail.com on 13 Jul 2009 at 9:27

GoogleCodeExporter commented 8 years ago
What would you think about simply parsing the creds out of the URL, if provided 
in
the form 
http://username:password@example.org/ ?

That will be great... that will be very very usefull ( especially when couchdb 
will
have "real" accounts / permissions )

Original comment by pig...@gmail.com on 28 Jul 2009 at 8:41

GoogleCodeExporter commented 8 years ago
and SQLAlchemy etc has that 'syntax' too.

Original comment by pig...@gmail.com on 28 Jul 2009 at 8:49

GoogleCodeExporter commented 8 years ago
This is a pretty simple change:
  http://github.com/steadicat/couchdb-python/commit/
f694a01454493eb38c5028805e226af95ca1017c

Original comment by stef...@gmail.com on 12 Aug 2009 at 6:23

Attachments:

GoogleCodeExporter commented 8 years ago
cmlenz, I noticed you added HTTP Basic support in the httplib branch.

However, there's a bug which prevents credentials from being propagated from 
Server 
instances to Database instances. Here is my fix:

http://github.com/steadicat/couchdb-python/commit/
d8d3b9370ed5f22897611e7688ad157c8c8a74fe

Original comment by stef...@gmail.com on 2 Sep 2009 at 6:37

GoogleCodeExporter commented 8 years ago
That should be fixed on the httplib branch by r195.

Original comment by cmlenz on 8 Sep 2009 at 9:39

GoogleCodeExporter commented 8 years ago

Original comment by djc.ochtman on 14 Dec 2009 at 10:31

GoogleCodeExporter commented 8 years ago
Since we now have this on the default branch, closing as fixed (merged the 
httplib
branch in r126ea9f43274).

Original comment by djc.ochtman on 29 Jan 2010 at 3:26