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 22E3CFDBB for ; Fri, 3 May 2013 13:43:13 +0000 (UTC) Received: (qmail 9959 invoked by uid 500); 3 May 2013 13:43:11 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 9797 invoked by uid 500); 3 May 2013 13:43:08 -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 9750 invoked by uid 99); 3 May 2013 13:43:06 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2013 13:43:06 +0000 Received: from localhost (HELO mail-lb0-f177.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2013 13:43:06 +0000 Received: by mail-lb0-f177.google.com with SMTP id 13so1521617lba.8 for ; Fri, 03 May 2013 06:43:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=Yomvd0JFM0i4xKrN+IqayQpM7G9JZ6azo173nwLx00w=; b=b+XJkWwoi2IF0UtY1QJmP1djiO8t3VSeCYi5BplMyfkl83v31Ty7cU4gyH75Pu6msH 8u/ycMwMeeGaK86THiVdRGJKLJ69SE5je3B1fK6WGcbgEQS9WpKSybEIao7XyQCiiUP1 W/9Koy2WHkKJqqyDro2ULI/p+TOw6xdUB8nHHrKjecOR8xzuyni5ej8Xrle80/UJlenI bfF7N0cYB0GpXwBS0M0qe6JZYy8u4jKhQMWey+y2Np/tAWWggC/PCE8nOaxlLcjFMAOu B4o4XOpwY2Glv893jUCDvJIKm8L2C18dU1z+4jmagngnGEt5PIJn0EAnRNmvHLIJeM4a z7MA== MIME-Version: 1.0 X-Received: by 10.112.134.70 with SMTP id pi6mr4261764lbb.72.1367588584630; Fri, 03 May 2013 06:43:04 -0700 (PDT) Received: by 10.112.210.66 with HTTP; Fri, 3 May 2013 06:43:04 -0700 (PDT) In-Reply-To: References: Date: Fri, 3 May 2013 14:43:04 +0100 Message-ID: Subject: Re: how to create cookie-session for an other user? From: Robert Newson To: "user@couchdb.apache.org" Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable You can't because, if you think about it, if you could login as someone without knowing their password it would defeat the purpose of authentication. :) B. On 3 May 2013 13:51, Michael Bykov wrote: > Hi, > > I use a node-server along with couchdb. With passport.js I can authentica= te > user with third-party oAuth provider, ok. I got this user in CouchDB. > > Now I like to set an session cookie in CouchDB and redirect it to main ho= st > which is couchapp. > > I could do this simply with: > > curl -X POST -i localhost:5984/_session?next=3D/myhost.org -d name=3Dme -= d > password=3Dsecret > > but I know only hashed-password, not plain text password for this user. > > How I can create session cookie for this user with hashed-password, _id, > _rev, etc, but without the plain password? > > > -- > =ED. > > http://diglossa.ru > xmpp://m.bykov@jabber.ru