Recommend this page to a friend! |
PHP OAuth Library | > | All threads | > | OAuth client error | > | (Un) Subscribe thread alerts |
|
edapn - 2013-07-03 21:46:44
Hello,
First of all, thank you for your time dedicated to this work. I have tried to configure this package, but when I try to login I receive this error: OAuth client error Error: OAuth server did not return a supported type of access token expiry time Can you please help me to fix this error? Thank you in advance
edapn - 2013-07-03 21:51:48 - In reply to message 1 from edapn
Sorry, I didn't specify. I receive this error for when I try to run login_with_linkedin.php
Manuel Lemos - 2013-07-03 22:54:06 - In reply to message 1 from edapn
I tried it here again and it works OK. Are you using the latest version of oauth_client.php (1.63) ?
If you are, can you set the debug and debug_http variables to true and post here the output that goes to your PHP error log file?
edapn - 2013-07-04 06:49:03 - In reply to message 3 from Manuel Lemos
Thank you for your reply.
My php logs are: [04-Jul-2013 06:43:17 UTC] OAuth client: Checking the OAuth token authorization state [04-Jul-2013 06:43:17 UTC] OAuth client: The OAuth access token is not set [04-Jul-2013 06:43:17 UTC] OAuth client: Requesting the unauthorized OAuth token [04-Jul-2013 06:43:17 UTC] OAuth client: Accessing the OAuth request token at https://api.linkedin.com/uas/oauth/requestToken?scope=r_fullprofile+r_emailaddress [04-Jul-2013 06:43:17 UTC] Connecting to api.linkedin.com [04-Jul-2013 06:43:17 UTC] Resolving HTTP server domain "api.linkedin.com"... [04-Jul-2013 06:43:17 UTC] Connecting to HTTP server IP 216.52.242.83 port 443... [04-Jul-2013 06:43:19 UTC] Connected to api.linkedin.com [04-Jul-2013 06:43:19 UTC] C GET /uas/oauth/requestToken?scope=r_fullprofile+r_emailaddress HTTP/1.1 [04-Jul-2013 06:43:19 UTC] C Host: api.linkedin.com [04-Jul-2013 06:43:19 UTC] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.63 $) [04-Jul-2013 06:43:19 UTC] C Accept: */* [04-Jul-2013 06:43:19 UTC] C Authorization: OAuth oauth_consumer_key="jlfbv7g9upra",oauth_nonce="344bb42516b4d140f03497e86fcab5ac",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1372920197",oauth_version="1.0",oauth_callback="http%3A%2F%2Flocalhost%2Fmarketingdashboard%2Flogin_with_linkedin.php",oauth_signature="lTIDb1M7xy0hHp7Pz4j32ChVgTE%3D" [04-Jul-2013 06:43:19 UTC] C Connection: Keep-Alive [04-Jul-2013 06:43:19 UTC] C [04-Jul-2013 06:43:19 UTC] S HTTP/1.1 200 OK [04-Jul-2013 06:43:19 UTC] S Server: Apache-Coyote/1.1 [04-Jul-2013 06:43:19 UTC] S Content-Type: text/plain [04-Jul-2013 06:43:19 UTC] S Content-Length: 236 [04-Jul-2013 06:43:19 UTC] S Vary: Accept-Encoding [04-Jul-2013 06:43:19 UTC] S Date: Thu, 04 Jul 2013 06:43:22 GMT [04-Jul-2013 06:43:19 UTC] S Age: 0 [04-Jul-2013 06:43:19 UTC] S X-LI-UUID: UB12cqaXDRNwwjFZQSsAAA== [04-Jul-2013 06:43:19 UTC] S X-Li-Colo: PROD-ELA4 [04-Jul-2013 06:43:19 UTC] S Set-Cookie: bcookie="v=2&4b59b60c-0c8a-4e7c-8620-ecb3b6156158"; domain=.linkedin.com; Path=/; Expires=Sat, 04-Jul-2015 18:20:54 GMT; [04-Jul-2013 06:43:19 UTC] S Connection: keep-alive [04-Jul-2013 06:43:19 UTC] S [04-Jul-2013 06:43:19 UTC] S oauth_token=af75b82c-01d0-4748-b082-e33a0647d76b&oauth_token_secret=e8b70a56-f6d0-411f-a725-40958f028469&oauth_callback_confirmed=true&xoauth_request_auth_url=https%3A%2F%2Fapi.linkedin.com%2Fuas%2Foauth%2Fauthorize&oauth_expires_in=599 [04-Jul-2013 06:43:19 UTC] Keeping the connection alive to api.linkedin.com [04-Jul-2013 06:43:19 UTC] OAuth client: Redirecting to OAuth authorize page https://api.linkedin.com/uas/oauth/authenticate?oauth_token=af75b82c-01d0-4748-b082-e33a0647d76b [04-Jul-2013 06:43:28 UTC] OAuth client: Checking the OAuth token authorization state [04-Jul-2013 06:43:28 UTC] OAuth client: The OAuth token is not yet authorized [04-Jul-2013 06:43:28 UTC] OAuth client: Checking the OAuth token and verifier [04-Jul-2013 06:43:28 UTC] OAuth client: Accessing the OAuth access token at https://api.linkedin.com/uas/oauth/accessToken [04-Jul-2013 06:43:28 UTC] Connecting to api.linkedin.com [04-Jul-2013 06:43:28 UTC] Resolving HTTP server domain "api.linkedin.com"... [04-Jul-2013 06:43:28 UTC] Connecting to HTTP server IP 216.52.242.83 port 443... [04-Jul-2013 06:43:29 UTC] Connected to api.linkedin.com [04-Jul-2013 06:43:29 UTC] C GET /uas/oauth/accessToken HTTP/1.1 [04-Jul-2013 06:43:29 UTC] C Host: api.linkedin.com [04-Jul-2013 06:43:29 UTC] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.63 $) [04-Jul-2013 06:43:29 UTC] C Accept: */* [04-Jul-2013 06:43:29 UTC] C Authorization: OAuth oauth_consumer_key="jlfbv7g9upra",oauth_nonce="09cdc844a00a4e7a555094b3270eea35",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1372920208",oauth_version="1.0",oauth_token="af75b82c-01d0-4748-b082-e33a0647d76b",oauth_verifier="78205",oauth_signature="jr%2F01Sdj2BlUn7f3t2DakZ850hs%3D" [04-Jul-2013 06:43:29 UTC] C Connection: Keep-Alive [04-Jul-2013 06:43:29 UTC] C [04-Jul-2013 06:43:29 UTC] S HTTP/1.1 200 OK [04-Jul-2013 06:43:29 UTC] S Server: Apache-Coyote/1.1 [04-Jul-2013 06:43:29 UTC] S Content-Type: text/plain [04-Jul-2013 06:43:29 UTC] S Content-Length: 156 [04-Jul-2013 06:43:29 UTC] S Vary: Accept-Encoding [04-Jul-2013 06:43:29 UTC] S Date: Thu, 04 Jul 2013 06:43:31 GMT [04-Jul-2013 06:43:29 UTC] S Age: 1 [04-Jul-2013 06:43:29 UTC] S X-LI-UUID: qPnvxqiXDRMQlkgo+SoAAA== [04-Jul-2013 06:43:29 UTC] S X-Li-Colo: PROD-ELA4 [04-Jul-2013 06:43:29 UTC] S Set-Cookie: bcookie="v=2&26269b57-f311-4ae7-81b0-620b90f2dd0e"; domain=.linkedin.com; Path=/; Expires=Sat, 04-Jul-2015 18:21:04 GMT; [04-Jul-2013 06:43:29 UTC] S Connection: keep-alive [04-Jul-2013 06:43:29 UTC] S [04-Jul-2013 06:43:29 UTC] S oauth_token=f2d44684-716d-4eb2-9a40-f9c0f7ef8adb&oauth_token_secret=9946706a-6686-4243-9a23-aa70edc91d33&oauth_expires_in=0&oauth_authorization_expires_in=0 [04-Jul-2013 06:43:29 UTC] Keeping the connection alive to api.linkedin.com [04-Jul-2013 06:43:29 UTC] OAuth client: Error: OAuth server did not return a supported type of access token expiry time Do you know what's going wrong? Thank you
Manuel Lemos - 2013-07-04 12:19:44 - In reply to message 4 from edapn
I found the problem. It is returning expiry seconds set to 0, which means it never expires. I have fixed the class and will upload the fixed version soon.
Anyway, this is unusual. I could not reproduce it myself because the expiry time is always set to 60 days for me. What did you do to get a non-expiring token?
edapn - 2013-07-04 18:56:46 - In reply to message 5 from Manuel Lemos
Thank you for your feedback.
I didn't do anything special for that. I am not quite sure why the response is oauth_expires_in=0. I am waiting for your changes to fix this problem. Thank you very much |
info at phpclasses dot org
.