3pillarlabs / socialauth

Java Library for authentication, getting profile, contacts and updating status on Google, Yahoo, Facebook, Twitter, LinkedIn, and many more providers.
https://3pillarlabs.github.io/socialauth/
MIT License
249 stars 141 forks source link

accessToken for Linkedin #19

Closed vgaidarji closed 10 years ago

vgaidarji commented 10 years ago

When I'm logging into Facebook, in socialAuthAdapter.getCurrentProvider().getAccessGrant().getKey() I have accessToken for Facebook, and it works fine.

When I'm logging into Linkedin in socialAuthAdapter.getCurrentProvider().getAccessGrant().getKey() and socialAuthAdapter.getCurrentProvider().getAccessGrant().getSecret() I have authorizationToken credentials, not accessToken.

In my application I used custom login to Linkedin, where I'm getting with authorizationToken -> accessToken (separate requests to Linkedin API). 1st call to https://www.linkedin.com/uas/oauth2/authorization, 2nd call to https://www.linkedin.com/uas/oauth2/accessToken.

Is it possible to save in socialAuthAdapter.getCurrentProvider().getAccessGrant().getKey() accessToken for Linkedin?

vgaidarji commented 10 years ago

I found the answer - current version (3.2) using oauth1 for Linkedin login flow, but needed oauth2. Creating pull request.