コード例 #1
0
        public void LiveAuthUtility_BuildAuthorizeUrl_WithEmptyState()
        {
            string url = LiveAuthUtility.BuildAuthorizeUrl(
                "000000004802B729",
                "http://www.foo.com/callback.aspx",
                new string[] { "wl.signin", "wl.basic" },
                ResponseType.Code,
                DisplayType.WinDesktop,
                ThemeType.Win7,
                "en-US",
                string.Empty);

            Assert.AreEqual("https://login.live.com/oauth20_authorize.srf?client_id=000000004802B729&redirect_uri=http%3A%2F%2Fwww.foo.com%2Fcallback.aspx&scope=wl.signin%20wl.basic&response_type=code&display=windesktop&locale=en-US&state=appstate%3D&theme=win7", url);
        }
コード例 #2
0
 /// <summary>
 /// Generates a consent URL that includes a set of provided parameters.
 /// </summary>
 public string GetLoginUrl(IEnumerable <string> scopes, string redirectUrl, DisplayType display, ThemeType theme, string locale, string state)
 {
     return(LiveAuthUtility.BuildAuthorizeUrl(this.clientId, redirectUrl, scopes, ResponseType.Code, display, theme, locale, state));
 }