private string GetUserId(string requestToken, string accessToken, string accessTokenSecret) { if (NewLinkedInSubscription.IsTestHook(requestToken)) { return("***TEST_USER_ID***"); } return(new LinkedInWebClient(this.appConfig, NewLinkedInSubscription.Tracer).GetProfile(accessToken, accessTokenSecret, "email-address").EmailAddress); }
private LinkedInTokenInformation ExchangeRequestTokenForAccessTokenAndSecret(string requestToken, string requestSecret, string oauthVerifier) { if (NewLinkedInSubscription.IsTestHook(requestToken)) { return(new LinkedInTokenInformation { Token = "***TEST_ACCESS_TOKEN***", Secret = "***TEST_ACCESS_TOKEN_SECRET***" }); } return(this.CreateAuthenticator().GetAccessToken(requestToken, requestSecret, oauthVerifier)); }
public void InitializeFolderAndNotifyApps(MailboxSession mailbox, ConnectSubscriptionProxy subscription) { if (mailbox == null) { throw new ArgumentNullException("mailbox"); } if (subscription == null) { throw new ArgumentNullException("subscription"); } if (NewLinkedInSubscription.IsTestHook(subscription.RequestToken)) { return; } new OscSyncLockCreator(mailbox).Create("LinkedIn", subscription.UserId); new PeopleConnectNotifier(mailbox).NotifyConnected(WellKnownNetworkNames.LinkedIn); }