Beispiel #1
0
        private string GetUserAuthorizationUrl(IToken requestToken)
        {
            var builder = new UriBuilder(ConsumerContext.UserAuthorizeUri);

            var collection = new NameValueCollection();

            if (builder.Query != null)
            {
                collection.Add(UriUtility.ParseQueryString(builder.Query));
            }

            if (_queryParameters != null)
            {
                collection.Add(_queryParameters);
            }

            collection[Parameters.OAuth_Token] = requestToken.Token;

            builder.Query = UriUtility.FormatQueryString(collection);

            return(builder.Uri.ToString());
        }
Beispiel #2
0
 public NameValueCollection ToBodyParameters()
 {
     return(UriUtility.ParseQueryString(Content));
 }