benoitc / couchbeam

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

Added headers property to amqp_params #35

Closed jbrisbin closed 13 years ago

jbrisbin commented 14 years ago

I patched couchbeam to accept a headers parameter when starting a connection so code in web apps can pass an authentication cookie by specifying headers=[{"Cookie","AuthSession=lkjalksdjfkajsdjf"}] in #amqp_params. This allows server-side code to act with the permissions of the currently-logged in user.

benoitc commented 13 years ago

Seem like you removed it since. I'm on the point to introduce a changes that would allows you to pass such things in database soon.

jbrisbin commented 13 years ago

Yeah, sorry. I was cleaning stuff up. I'll send you a patch that covers the minor changes.

benoitc commented 13 years ago

Fixed in latest head you can now do :

> {ok, Db} = couchbeam:open_db(Server, "mydb", [{cookie, "AuthSession=lkjalksdjfkajsdjf"}])