Пример #1
0
        public ActionResult Login(string returnUrl)
        {
            DotNetOpenAuth.AspNet.Clients.TwitterClient client = new TwitterClient(ConfigurationManager.AppSettings["twitterConsumerKey"], ConfigurationManager.AppSettings["twitterConsumerSecret"]);

            UrlHelper helper = new UrlHelper(this.ControllerContext.RequestContext);
            var result = helper.Action("Index","Auth", null, "http");

            client.RequestAuthentication(this.HttpContext, new Uri(result));

            return new EmptyResult();
        }
Пример #2
0
 public override void ProcessSignInRequest(Scope scope, HttpContextBase httpContext)
 {
     var client = new TwitterClient(this.consumerKey, this.consumerSecret);
     client.RequestAuthentication(httpContext, this.MultiProtocolIssuer.ReplyUrl);
 }