Пример #1
0
        // ReSharper disable InconsistentNaming
        public ActionResult Authorize(string oauth_token, string oauth_verifier)
        // ReSharper restore InconsistentNaming
        {
            var oAuthTokenSecret   = TempData[DataKeys.OAuthTokenSecret] as string;
            var authenticationInfo = _oAuthProvider.Authenticate(oauth_token, oAuthTokenSecret, oauth_verifier);

            if (authenticationInfo.IsAuthenticated)
            {
                _logger.Info(string.Format(UserHasLoggedInMessage, authenticationInfo.UserName));
            }
            return(RedirectToLastPage());
        }
Пример #2
0
 public AccessToken Authenticate(Func <string, string> userAuthCallback)
 {
     return(Token = oauthProvider.Authenticate(userAuthCallback));
 }