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":"https://example.net:5984/db","headers":{"Authorization":"Basic
> Ym9iQGV4YW1wbGUuY29tOnBhc3N3b3Jk"}}, "target":"local-db"}
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 be?
I'd like to know how OAuth is used to authenticate to CouchDB, but there's
almost nothing about it in the wiki.
—Jens
* http://wiki.apache.org/couchdb/Replication