Return-Path: Delivered-To: apmail-incubator-shindig-dev-archive@minotaur.apache.org Received: (qmail 46493 invoked from network); 3 Jul 2009 06:29:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jul 2009 06:29:30 -0000 Received: (qmail 47314 invoked by uid 500); 3 Jul 2009 06:29:40 -0000 Delivered-To: apmail-incubator-shindig-dev-archive@incubator.apache.org Received: (qmail 47247 invoked by uid 500); 3 Jul 2009 06:29:39 -0000 Mailing-List: contact shindig-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: shindig-dev@incubator.apache.org Delivered-To: mailing list shindig-dev@incubator.apache.org Received: (qmail 47237 invoked by uid 99); 3 Jul 2009 06:29:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jul 2009 06:29:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [86.65.39.20] (HELO smtp.dmail.dachary.org) (86.65.39.20) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jul 2009 06:29:27 +0000 Received: by smtp.dmail.dachary.org (Postfix, from userid 65534) id C292A13A0F0; Fri, 3 Jul 2009 08:29:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on smtp.dmail.dachary.org X-Spam-Level: Received: from [10.8.0.6] (unknown [10.8.0.6]) by smtp.dmail.dachary.org (Postfix) with ESMTPS id E01D213A0ED for ; Fri, 3 Jul 2009 08:29:04 +0200 (CEST) Message-ID: <4A4DA52C.2030706@dachary.org> Date: Fri, 03 Jul 2009 08:29:00 +0200 From: Loic Dachary Organization: pokersource User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: shindig-dev@incubator.apache.org Subject: Re: Bug or misunderstanding in OAuth with partuza.nl ? References: <4A4D308F.7050704@dachary.org> <818767740907021635y621c1bft9bb5e7afbf18eca6@mail.gmail.com> In-Reply-To: <818767740907021635y621c1bft9bb5e7afbf18eca6@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: multipart/mixed; boundary="------------070808030809070301020408" X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.2.5 --------------070808030809070301020408 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chris Chabot wrote: > Hey Loic, > > The OAuth token you find in the edit profile -> OAuth tab is the > one meant for 3 legged OAuth, and the one listed in the application > overview for 2 legged, so things were supposed to break in the > second attempt. Thanks for this clarification. > In the first situation though, as you noted it works with partuza > (which is exactly the same code as you're running locally), so it's > bound to be some configuration issue somewhere. Note that it does not work on partuza.nl with the key found in edit profile => OAuth. It only works on partuza.nl with the default key found in the http://opensocial-php-client.googlecode.com/files/opensocial-php-client-1.0.1.zip as installed at http://pokersource.info/opensocial-php-client/examples/listFriends.php?test=partuza If modifying the code of the example below is supposed to work, could it be that something is misconfigured on partuza.nl ? Or am I even more confused than before ? In the following line I used the keys that show on http://www.partuza.nl/profile/edit#oauth for http://www.partuza.nl/profile/1622 $osapi = new osapi($provider, osapiOAuth3Legged::performOAuthLogin('d2eaf3fb-d7f2-cecf-9ce5-cfebeeebffc7', 'a0542a03a2ce8c3cb2032e724b0ecf75', new osapiFileStorage('/tmp/osapi'), $provider, $localUserId)); and I get the following : *Fatal error*: Uncaught exception 'osapiException' with message 'Error requesting oauth access token, code 401, message:

401 - - Unexpected token type (request) or unknown token

' in /var/www/opensocial-php-client/osapi/auth/osapiOAuth3Legged.php:118 Stack trace: #0 /var/www/opensocial-php-client/osapi/auth/osapiOAuth3Legged.php(83): osapiOAuth3Legged->upgradeRequestToken('c0eec0f0-f8cc-c...', '01784ca90bdec8e...') #1 /var/www/opensocial-php-client/examples/__init__.php(58): osapiOAuth3Legged::performOAuthLogin('d2eaf3fb-d7f2-c...', 'a0542a03a2ce8c3...', Object(osapiFileStorage), Object(osapiPartuzaProvider), 'c5abdb7ae4b8a71...') #2 /var/www/opensocial-php-client/examples/listFriends.php(18): require_once('/var/www/openso...') #3 {main} thrown in */var/www/opensocial-php-client/osapi/auth/osapiOAuth3Legged.php* on line *118* I'll try to make this work with a key other than the default against partuza.nl for now. Unless you suggest there is a better approach. Thanks -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpNpSsACgkQ8dLMyEl6F22OXACggzVRrdyan31k+R/pnOYRajhK ZMcAnj4X34y3yjlqZmBZt0g0upgM/pE/ =UFpU -----END PGP SIGNATURE----- --------------070808030809070301020408--