Example #1
0
        internal static string BuildAuthorizationRequestUrl(Credentials credentials, AuthorizationRequest authorizationRequest)
        {
            var builder = new QueryStringBuilder();
            var data    = AuthorizationParse.GetData(authorizationRequest);

            builder.EncodeCredentialsAsQueryString(credentials);

            foreach (var pair in data)
            {
                builder.Append(pair.Key, pair.Value.ToString(CultureInfo.InvariantCulture));
            }

            return(HttpUtility.UrlDecode(builder.ToString()));
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        internal static string buildAuthorizationRequestUrl(Credentials credentials, AuthorizationRequest authorizationRequest)
        {
            QueryStringBuilder           builder = new QueryStringBuilder();
            IDictionary <string, string> data    = AuthorizationParse.GetData(authorizationRequest);

            builder.
            EncodeCredentialsAsQueryString(credentials);

            foreach (KeyValuePair <string, string> pair in data)
            {
                builder.Append(pair.Key, pair.Value);
            }

            return(WebUtility.UrlDecode(builder.ToString()));
        }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        internal static string buildAuthorizationRequestUrl(Credentials credentials, AuthorizationRequest authorizationRequest)
        {
            QueryStringBuilder           builder = new QueryStringBuilder();
            IDictionary <string, string> data    = AuthorizationParse.GetData(authorizationRequest);

            builder.
            EncodeCredentialsAsQueryString(credentials);

            foreach (KeyValuePair <string, string> pair in data)
            {
#if !NETSTANDARD1_6
                builder.Append(pair.Key, pair.Value.ToString(CultureInfo.InvariantCulture));
#else
                builder.Append(pair.Key, pair.Value);
#endif
            }

            return(WebUtility.UrlDecode(builder.ToString()));
        }