shindig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Loic Dachary <l...@dachary.org>
Subject Re: Bug or misunderstanding in OAuth with partuza.nl ?
Date Fri, 03 Jul 2009 06:29:00 GMT
-----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: <html><body><h1>401
- - Unexpected token type (request) or unknown token</h1></body></html>'
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-----


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message