开发者

Linked In retrieveTokenRequest returns "signature_invalid" problem

开发者 https://www.devze.com 2023-03-26 23:23 出处:网络
I am writing a web application with Linked In OAuth authentication. I use simple-linkedinphp library. It has worked good. But one day (not far ago) it became broken. I can\'t get token with use of ret

I am writing a web application with Linked In OAuth authentication. I use simple-linkedinphp library. It has worked good. But one day (not far ago) it became broken. I can't get token with use of retrieveTokenRequest() method. Even demo.php (from simple-linkedinphp library) doesn't work with my api and secret key.

Does anybody experienced such issue? I have got following response for retrieveTokenRequest() method:

array
  'linkedin' => 
    array
      'oauth_problem' => string 'signature_invalid' (length=17)
      'oauth_problem_advice' => string 'com.linkedin.security.auth.pub.LoginDeniedInvalidAuthTokenException while obtaining request token for :POST&https%3A%2F%2Fapi.linkedin.com%2Fuas%2Foauth%2FrequestToken&oauth_callback%3Dhttp%253A%252F%252Fapi.propertag.proj%252Fauthenticate%252Foauth%253Fprovider%253Dlinkedin%2526callback-url%253Dhttp%25253A%25252F%25252Fin.propertag.proj%25252Fopenid%25252Boauth.html%2526lType%253Dinitiate%2526lResponse%253D1%26oauth_consumer_key%3Dler1lhjlr04q%26oauth_nonce%3D37642191fbd5d7c3b69ab42cced8b9cc%26oauth_signat'... (length=656)
  'info' => 
    array
      'url' => string 'https://api.linkedin.com/uas/oauth/requestToken' (length=47)
      'content_type' => string 'application/x-www-form-urlencoded;charset=UTF-8' (length=47)
      'http_code' => int 401
      'header_size' => int 1090
      'request_size' => int 602
      'filetime' => int -1
      'ssl_verify_result' => int 0
      'redirect_count' => int 0
      'total_time' => float 0.844714
      'namelookup_time' => float 0.046769
      'connect_time' => float 0.23863
      'pretransfer_time' => float 0.630895
      'size_upload' => float 0
      'size_download' => float 819
      'speed_download' => float 969
      'speed_upload' => float 0
      'download_content_length' => float 819
      'upload_content_length' =&开发者_StackOverflowgt; float 0
      'starttransfer_time' => float 0.844679
      'redirect_time' => float 0
      'certinfo' => 
        array
          empty
  'oauth' => 
    array
      'header' => string 'Authorization: OAuth realm="http%3A%2F%2Fapi.linkedin.com",oauth_version="1.0",oauth_nonce="37642191fbd5d7c3b69ab42cced8b9cc",oauth_timestamp="1312808590",oauth_consumer_key="ler1lhjlr04q",oauth_callback="http%3A%2F%2Fapi.propertag.proj%2Fauthenticate%2Foauth%3Fprovider%3Dlinkedin%26callback-url%3Dhttp%253A%252F%252Fin.propertag.proj%252Fopenid%252Boauth.html%26lType%3Dinitiate%26lResponse%3D1",oauth_signature_method="HMAC-SHA1",oauth_signature="lsbQZvoII9Z5YsqM3aUPbLdiEoI%3D"' (length=481)
      'string' => string 'POST&https%3A%2F%2Fapi.linkedin.com%3A80%2Fuas%2Foauth%2FrequestToken&oauth_callback%3Dhttp%253A%252F%252Fapi.propertag.proj%252Fauthenticate%252Foauth%253Fprovider%253Dlinkedin%2526callback-url%253Dhttp%25253A%25252F%25252Fin.propertag.proj%25252Fopenid%25252Boauth.html%2526lType%253Dinitiate%2526lResponse%253D1%26oauth_consumer_key%3Dler1lhjlr04q%26oauth_nonce%3D37642191fbd5d7c3b69ab42cced8b9cc%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1312808590%26oauth_version%3D1.0' (length=489)
  'error' => string 'OAuth callback URL was not confirmed by the LinkedIn end-point' (length=62)
  'success' => boolean false


Did you make any changes to the Simple-LinkedIn Library code that may have caused it to break? As for the demo script, because it is divided into various files, you have to make sure that you include your api key and secret in each file.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号