Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZCS-2691 Create DataSource implementation for LinkedIn contacts via oAuth #696

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

chinmay15
Copy link
Contributor

Problem/Task: create datasource implementation for Linkedin contacts sync using oAuth2

Fix:

  1. Authorize and authenticate using oAuth2 rest api provided by Linkedin
  2. Folder created is with name as -contact-linkedin, as profile call for linkedin needs "r_fullprofile" permission and this permission in given by linkedin on request. Request with linkedin support is raised.

Testing done:

  1. Contact folder and datasource is created in user account.
  2. Tested functionality manually.
zmprov gds cp1
# name [email protected]
# type oauth2contact
objectClass: zimbraDataSource
zimbraCreateTimestamp: 20180724133602.672Z
zimbraDataSourceConnectionType: cleartext
zimbraDataSourceEnabled: TRUE
zimbraDataSourceFolderId: 60020
zimbraDataSourceHost: www.linkedin.com
zimbraDataSourceId: 54e84c2e-50e5-405f-aa60-9c008d41aac0
zimbraDataSourceImportClassName: com.zimbra.oauth.handlers.impl.LinkedinContactsImport
zimbraDataSourceImportOnly: FALSE
zimbraDataSourceName: [email protected]
zimbraDataSourceOAuthRefreshToken: VALUE-BLOCKED
zimbraDataSourcePollingInterval: 1d
zimbraDataSourceType: oauth2contact

Testing needs to be done by QA:

  1. go to https://www.linkedin.com/developer/apps
  2. create app from - my apps -> create app
  3. select default app permissions "r_basicprofile" and "r_emailaddress"
  4. add "https://<your_host_name>/service/extension/oauth2/authenticate/linkedin" OAuth 2.0 authorized redirect url
  5. set zimbraOAuthConsumerRedirectUri: https://cpathak.zdev.local/service/extension/oauth2/authenticate/linkedin:linkedin
  6. set zimbraOAuthConsumerCredentials: <app_client_id>:<app_client_secret>:linkedin
  7. Make sure, Authorization and Authentication is done using oAuth2
  8. Make sure, contacts folder and datasource is created as mentioned above

Linked PR:
Zimbra/zm-oauth-social#44

@@ -1296,8 +1296,9 @@
public static final KnownKey zm_oauth_classes_handlers_yahoo = KnownKey.newKey("com.zimbra.oauth.handlers.impl.YahooOAuth2Handler");
public static final KnownKey zm_oauth_classes_handlers_google = KnownKey.newKey("com.zimbra.oauth.handlers.impl.GoogleOAuth2Handler");
public static final KnownKey zm_oauth_classes_handlers_facebook = KnownKey.newKey("com.zimbra.oauth.handlers.impl.FacebookOAuth2Handler");


public static final KnownKey zm_oauth_classes_handlers_linkedin = KnownKey.newKey("com.zimbra.oauth.handlers.impl.LinkedinOAuth2Handler");
Copy link
Contributor

@desouzas desouzas Aug 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prashant said we were going to put LinkedIn aside for now.

If we're adding them all, please add twitter.

e: Just noticed the date on this haha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants