开发者

Django & CouchDB - Common authentication backend

Here's the setup: I'm using Django with MySQL for a web app. I want to add CouchDB for storing user data. I want to have CouchDB's API's exposed so that clients can connect directly to CouchDB (for using the awesome replication API with mobile clients, among other things) and I want users to be able to log int开发者_C百科o the Django web app via browser.

What is the best way to enforce a common authentication between CouchDB and Django? If a mobile client accesses CouchDB directly, I want the login credentials to be consistent with what Django uses. Is LDAP the best way to implement this? Any other suggestions?


Unfortunately, there is currently no ready-made solution for you.

You possible routes are:

  • Make Django use CouchDB's authentication system.
  • Make CouchDB use Django's authentication system.
  • Make a third party back end that is the auth system and hook it into both Django and CouchDB.

They all require work. #3 could be LDAP, but currently there is no LDAP adapter for CouchDB, although it wouldn't be very hard to write. #1 would be useful to others as well I'd think.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜