public string SaveAccessToken(string oauth_token, string oauth_verifier) { var oAuthClient = _splitwiseClientBuilder.BuildOAuthClient(); string requestSecret = _usersRegistry.GetRequestSecret(oauth_token); (string accessToken, string accessTokenSecret) = oAuthClient.GetAccessToken(oauth_token, requestSecret, oauth_verifier); _usersRegistry.SaveAccessToken(oauth_token, accessToken, accessTokenSecret); return("Authorization successful!"); }
protected override void PerformActionInternal(string userId, Activity reply, string message) { var oAuthClient = SplitwiseClientBuilder.BuildOAuthClient(); (string requestToken, string requestTokenSecret) = oAuthClient.GetRequestToken(); UsersRegistry.SaveRequestToken(userId, requestToken, requestTokenSecret); string authorizationUrl = oAuthClient.GetAuthorizationUrl(requestToken); var singinCard = CreateSinginCard(authorizationUrl); reply.Attachments.Add(singinCard.ToAttachment()); }