//http://api.linkedin.com/v1/people/~
        public static void RequestAuthorization(WebConsumer consumer)
        {
            if (consumer == null)
            {
                throw new ArgumentNullException("consumer");
            }
            Uri callback = HttpRequestExtensions.GetUrlRewriter(HttpContext.Current.Request.Headers, Util.GetCallbackUrlFromContext().StripQueryArgumentsWithPrefix("oauth_"));
            var request  = consumer.PrepareRequestUserAuthorization(callback, null, null);

            consumer.Channel.Send(request);
        }
Пример #2
0
 public static Uri GetUrlRewriter(this HttpRequestBase request)
 {
     return(request != null?HttpRequestExtensions.GetUrlRewriter(request.Headers, request.Url) : null);
 }