incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: replication on touchdb and authentication
Date Mon, 11 Feb 2013 19:05:10 GMT

On Feb 11, 2013, at 10:45 AM, svilen <az@svilendobrev.com> wrote:

> mmh. i bet i never asked for about the credentials at all.

You asked about passwords, which are the most common form of credential[1].

> so in your words, how to make the replicator use the
> persisted-session-state cookie instead of re-auth?

*shrug* it’s automatic. NSURLConnection has a shared cookie store used by all instances
in the app. So if you make a request to the remote server (using NSURLConnection, or a page
loaded in a UIWebView) that causes a session cookie to be set, then the replicator will implicitly
use it. Just be aware that ten minutes later when the cookie expires, your replication will
start failing with a 401 status. Then you’ll have to redo whatever you did, to get a new
session cookie.

—Jens

[1]: http://en.wikipedia.org/wiki/Credential#Cryptography
Mime
View raw message