LinkedIn Scribe Integration

Available since version 1.5.0

Purpose

AEM 5.6.1 includes the Scribe library for integration with social services using OAuth. While Scribe supports LinkedIn, it only supports this using OAuth 1.0a whereas LinkedIn is recommending that new application be written using OAuth 2.0.

How to Use

Scribe uses a builder pattern to construct instances of OAuthService.

OAuthService service = new ServiceBuilder()
    .provider(LinkedInApi20.class)
    .apiKey(key)
    .apiSecret(secret)
    .callback("http://mysite.com/linkedin")
    .build();

Scopes can be specified using the scope() method:

OAuthService service = new ServiceBuilder()
    .provider(LinkedInApi20.class)
    .apiKey(key)
    .apiSecret(secret)
    .callback("http://mysite.com/linkedin")
    .scope("r_basicprofile,r_emailaddress")
    .build();

Once you have this object, you can use the getAuthorizationUrl(), getAccessToken(), and signRequest() methods from the OAuthService API.

Please report any issues with the Feature or documentation on the ACS AEM Commons GitHub Issue tracker.
comments powered by Disqus