Esempio n. 1
0
        public static string GetWindowsLiveAuthenticationUrl()
        {
            RestClientEx        client  = ClientFactory("https://login.live.com");
            RestRequestEx       request = new RestRequestEx("oauth20_authorize.srf", Method.GET);
            NameValueCollection nv      = new Model.WindowsLiveAuthenticationQuery().GetQuery();

            request.AddQueryParameters(nv);
            return(client.BuildUri(request).ToString());
        }
        /// <summary>
        /// Gets the OAUTH2 Windows Live authentication URL
        /// </summary>
        /// <returns>The ready-to-call authentication URL</returns>
        public static string GetWindowsLiveAuthenticationUrl(Model.WindowsLiveAuthenticationQuery queryParams = null)
        {
            logger.LogTrace("GetWindowsLiveAuthenticationUrl() called");
            var parameters = queryParams ?? new Model.WindowsLiveAuthenticationQuery();

            var url = QueryHelpers.AddQueryString(
                "https://login.live.com/oauth20_authorize.srf",
                parameters.GetQuery());

            url = System.Web.HttpUtility.UrlDecode(url);
            logger.LogDebug("GetWindowsLiveAuthenticationUrl: Returning URL: {}", url);
            return(url);
        }