couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <>
Subject How does OAuth support, or custom headers, work in the replicator?
Date Sat, 19 May 2012 00:54:51 GMT
There's a small bit in the wiki* that hints at a replication JSON parameter to set custom headers.
One of the examples of a _replicate request shows the body:

> {"source":{"url":"","headers":{"Authorization":"Basic Ym9iQGV4YW1wbGUuY29tOnBhc3N3b3Jk"}},

There's no further explanation; could someone clarify whether the 'headers' property can be
used to add arbitrary HTTP headers to the requests sent by the replicator?

A few paragraphs later is the statement:

> Using a JSON hash (instead of a plain string) may also be used to specify OAuth (by adding
a "oauth" field to the hash).

I don't understand this at all ('oauth' isn't an HTTP header, so does this mean to add it
as a top-level property in the _replicate body? Or somewhere else? And what should its contents

I'd like to know how OAuth is used to authenticate to CouchDB, but there's almost nothing
about it in the wiki.


View raw message