benoitc / couchbeam

Apache CouchDB client in Erlang
Other
242 stars 113 forks source link

add cookie auth support #98

Closed benoitc closed 7 years ago

benoitc commented 10 years ago

basic auth is killing any performance right now.. Using session auth would improve that. The workflow would be:

  1. When opening a database, authenticate to /_session, with the username and password
  2. grab the session cookie and store it
  3. if the session expire (got 401), we reconnect to _session to retrieve the new session cookie

Then we do all requests to couch using a cookie.

It depends on https://github.com/benoitc/hackney/issues/56