public static string GetAuthenticateRedirectUrl(string returnUrl, string siteName, string authPolicy, string federatedDomain, string userName, bool addCBCXT, bool useSilentAuthentication, bool useConsumerRps) { if (useSilentAuthentication) { returnUrl += ((returnUrl.IndexOf('?') == -1) ? "?" : "&"); returnUrl += "silent=1"; } string text = LiveIdAuthentication.GetRedirectUrl(useSilentAuthentication ? LiveIdAuthentication.RedirectType.SilentAuthenticate : LiveIdAuthentication.RedirectType.Authenticate, siteName, returnUrl, authPolicy, useConsumerRps); if (!string.IsNullOrEmpty(federatedDomain)) { ExTraceGlobals.LiveIdAuthenticationModuleTracer.TraceDebug <string>(0L, "Append whr parameter {0} for live authentication to bypass the 'go there' experience", federatedDomain); text = text + "&whr=" + HttpUtility.UrlEncode(federatedDomain); } if (!string.IsNullOrEmpty(userName)) { string text2 = text; text = string.Concat(new string[] { text2, "&", Utilities.UserNameParameter, "=", userName }); } if (addCBCXT) { text += "&CBCXT=out"; } return(text); }
public static string GetLiveLogoutRedirectUrl(string returnUrl, string siteName, bool useConsumerRps) { return(LiveIdAuthentication.GetRedirectUrl(LiveIdAuthentication.RedirectType.Logout, siteName, returnUrl, null, useConsumerRps)); }