public ActionResult Authorize()
        {
            if (OAuthServiceProvider.PendingAuthorizationRequest == null)
            {
                return RedirectToAction("Edit");
            }

            var model = new AccountAuthorizeModel
            {
                ConsumerApp = OAuthServiceProvider.PendingAuthorizationConsumer.Name,
                IsUnsafeRequest = OAuthServiceProvider.PendingAuthorizationRequest.IsUnsafeRequest,
            };

            return View(model);
        }
        public ActionResult Authorize(bool isApproved)
        {
            if (isApproved)
            {
                var consumer = OAuthServiceProvider.PendingAuthorizationConsumer;
                var tokenManager = OAuthServiceProvider.ServiceProvider.TokenManager;
                var pendingRequest = OAuthServiceProvider.PendingAuthorizationRequest;
                ITokenContainingMessage requestTokenMessage = pendingRequest;
                var requestToken = tokenManager.GetRequestToken(requestTokenMessage.Token);

                var response = OAuthServiceProvider.AuthorizePendingRequestTokenAsWebResponse();
                if (response != null)
                {
                    // The consumer provided a callback URL that can take care of everything else.
                    return response.AsActionResult();
                }

                var model = new AccountAuthorizeModel
                {
                    ConsumerApp = consumer.Name,
                };

                if (!pendingRequest.IsUnsafeRequest)
                {
                    model.VerificationCode = ServiceProvider.CreateVerificationCode(consumer.VerificationCodeFormat, consumer.VerificationCodeLength);
                    requestToken.VerificationCode = model.VerificationCode;
                    tokenManager.UpdateToken(requestToken);
                }

                return View("AuthorizeApproved", model);
            }
            else
            {
                OAuthServiceProvider.PendingAuthorizationRequest = null;
                return View("AuthorizeDenied");
            }
        }