joscha / play-authenticate

An authentication plugin for Play Framework 2.x (Java)
http://joscha.github.com/play-authenticate/
Other
807 stars 367 forks source link

play-usage example linkedin not working? #284

Closed bravegag closed 8 years ago

bravegag commented 8 years ago

I enabled the linkedin in the play-usage example and I get the following exception/problem:

[warn] o.a.h.c.p.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: lidc="b=TB88:g=133:u=1:i=1442781238:t=1442867638:s=AQHk7D_F0kMMFibqEIOmbLzj8tb2FeEB"; Expires=Mon, 21 Sep 2015 20:33:58 GMT; domain=.linkedin.com; Path=/". Invalid 'expires' attribute: Mon, 21 Sep 2015 20:33:58 GMT

and the error message:

oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: Service provider responded in error: 403 (Forbidden)

What's the issue? I have provided both the consumerKey and consumerSecret in the mine.conf file.

bravegag commented 8 years ago

I tested access with a standalone example using org.scribe and it works ... it does really seem some problem/misalignment with linkedin API in play-authenticate

dastko commented 8 years ago

I have same problem...

akitaylor commented 8 years ago

I've also come up against this error and really seems to be the problem of the linkedin provider. The problem is the following: reference.conf:93 requestTokenUrl="https://api.linkedin.com/uas/oauth/requestToken?scope=r_fullprofile+r_emailaddress"

This should be modified to (or overridden in mine.conf): requestTokenUrl="https://api.linkedin.com/uas/oauth/requestToken?scope=r_basicprofile+r_emailaddress"

joscha commented 8 years ago

Can anyone provide a patch that does not include changing the scope?

akitaylor commented 8 years ago

Sadly, LinkedIn changed its policy this year and this includes restricting the freely accessible profile info. To access full profile you need special login privileges: http://stackoverflow.com/questions/30115356/is-linkedin-api-allowing-to-access-all-user-profiles

joscha commented 8 years ago

I see. Sad times. Could you open a PR where you change the standard from what it is to a working link? On 1 Dec 2015 10:34 pm, "Akos Szabo" notifications@github.com wrote:

Sadly, LinkedIn changed its policy this year and this includes restricting the freely accessible profile info. To access full profile you need special login privileges:

http://stackoverflow.com/questions/30115356/is-linkedin-api-allowing-to-access-all-user-profiles

— Reply to this email directly or view it on GitHub https://github.com/joscha/play-authenticate/issues/284#issuecomment-160942173 .

joscha commented 8 years ago

Fixed via #289.