Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1D2F7D371 for ; Wed, 13 Feb 2013 19:51:48 +0000 (UTC) Received: (qmail 32015 invoked by uid 500); 13 Feb 2013 19:51:46 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 31915 invoked by uid 500); 13 Feb 2013 19:51:46 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 31907 invoked by uid 99); 13 Feb 2013 19:51:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2013 19:51:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [128.200.36.30] (HELO translab.its.uci.edu) (128.200.36.30) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2013 19:51:40 +0000 Received: from translab.its.uci.edu (localhost.localdomain [127.0.0.1]) by translab.its.uci.edu (8.13.1/8.12.10) with ESMTP id r1DJpJkC018175 for ; Wed, 13 Feb 2013 11:51:19 -0800 Received: (from jmarca@localhost) by translab.its.uci.edu (8.13.1/8.13.1/Submit) id r1DJpJYZ018174 for user@couchdb.apache.org; Wed, 13 Feb 2013 11:51:19 -0800 Date: Wed, 13 Feb 2013 11:51:19 -0800 From: James Marca To: "user@couchdb.apache.org" Subject: Re: replication on touchdb and authentication Message-ID: <20130213195119.GP10919@translab.its.uci.edu> Mail-Followup-To: "user@couchdb.apache.org" References: <20130208121706.5320cd2e@svilendobrev.com> <20130209171051.4b9d9c93@svilendobrev.com> <4A21495E-F3A6-47FB-AB74-7D1A0CA25080@couchbase.com> <20130211204537.4ee5f45a@svilendobrev.com> <60E8C707-3CFA-421C-B6D2-4588CF89A34D@couchbase.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0et/Au7PJwzVwd4K" Content-Disposition: inline In-Reply-To: <60E8C707-3CFA-421C-B6D2-4588CF89A34D@couchbase.com> User-Agent: Mutt/1.4.1i X-Virus-Checked: Checked by ClamAV on apache.org --0et/Au7PJwzVwd4K Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 11, 2013 at 11:05:10AM -0800, Jens Alfke wrote: >=20 > On Feb 11, 2013, at 10:45 AM, svilen wrote: >=20 > > mmh. i bet i never asked for about the credentials at all. >=20 > You asked about passwords, which are the most common form of credential[1= ]. >=20 > > so in your words, how to make the replicator use the > > persisted-session-state cookie instead of re-auth? >=20 > *shrug* it=E2=80=99s automatic. NSURLConnection has a shared cookie store= used by all instances in the app. So if you make a request to the remote s= erver (using NSURLConnection, or a page loaded in a UIWebView) that causes = a session cookie to be set, then the replicator will implicitly use it. Jus= t be aware that ten minutes later when the cookie expires, your replication= will start failing with a 401 status. Then you=E2=80=99ll have to redo wha= tever you did, to get a new session cookie. >=20 Will the cookie expire even if the replicator is using it (implicitly)? I *thought* that cookies reset their timeout timer on each use James > =E2=80=94Jens >=20 > [1]: http://en.wikipedia.org/wiki/Credential#Cryptography --0et/Au7PJwzVwd4K Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFRG+63+t/6L/9qydcRApi8AJ9NgKDljeZyao4yYQtJfveQPogXUQCeK8Gc GjgYMfh96Pk56Qs3iqGYyaI= =dP3s -----END PGP SIGNATURE----- --0et/Au7PJwzVwd4K--