Results 1 to 4 of 4

Thread: LinkedIn connect unreliable. Random 401s

  1. #1
    Join Date
    Jan 2008
    Posts
    253

    Default LinkedIn connect unreliable. Random 401s

    Hi,

    I'm using the LinkedIn Connect function and I'm seeing a kind of sometimes it works, sometimes it doesn't. This is what I seem to be getting at times

    PHP Code:
    [MSAWARN [2011-08-12 15:11:55,438RestTemplate.handleResponseError(478) | POST request for "https://api.linkedin.com/uas/oauth/accessToken" resulted in 401 (Unauthorized); invoking error handler
    [MSAERROR [2011-08-12 15:11:55,442MySimpleExceptionResolver.doResolveException(24) | org.springframework.web.client.HttpClientErrorException401 Unauthorized
    org
    .springframework.web.client.HttpClientErrorException401 Unauthorized
        at org
    .springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:75)
        
    at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:486)
        
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:443)
        
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:415)
        
    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:391)
        
    at org.springframework.social.oauth1.OAuth1Template.exchangeForToken(OAuth1Template.java:195)
        
    at org.springframework.social.oauth1.OAuth1Template.exchangeForAccessToken(OAuth1Template.java:133)
        
    at org.springframework.social.connect.web.ConnectSupport.completeConnection(ConnectSupport.java:101)
        
    at org.springframework.social.connect.web.ConnectController.oauth1Callback(ConnectController.java:154
    And then it suddenly works normally. So, the 401 seems kind of false.

    Does Linkedin use some kind of timeout on your connect requests where in a development situation rapid connect, disconnect leads to exceptions?

    Kind regards,
    Marc

  2. #2
    Join Date
    Jan 2008
    Posts
    253

    Default

    I'm also seeing this guy

    PHP Code:
    [MSAERROR [2011-08-12 15:42:28,510MySimpleExceptionResolver.doResolveException(24) | java.lang.NullPointerException
    java
    .lang.NullPointerException
        at org
    .springframework.social.oauth1.AuthorizedRequestToken.getValue(AuthorizedRequestToken.java:44)
        
    at org.springframework.social.oauth1.OAuth1Template.exchangeForAccessToken(OAuth1Template.java:129)
        
    at org.springframework.social.connect.web.ConnectSupport.completeConnection(ConnectSupport.java:101)
        
    at org.springframework.social.connect.web.ProviderSignInController.oauth1Callback(ProviderSignInController.java:146

  3. #3
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Somebody (ConnectController) is creating a new AuthorizedRequestToken from a null OAuthToken (request token) instance. Since the request token is retrieved from the session after the provider callback, is it possible your session expired in the meantime - or was otherwise not reassociated? We should handle this case more cleanly, but I'd be interested to know why the request token is dissappearing from user sessions in your environment.
    Keith Donald
    Core Spring Development Team

  4. #4
    Join Date
    Jan 2008
    Posts
    253

    Default

    I seriously dont know. The code is the same as being used for Facebook and Twitter login, which work fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •