// Token: 0x0600003B RID: 59 RVA: 0x000038A0 File Offset: 0x00001AA0
        internal static Uri RemovePropertiesFromOriginalUri(Uri originalUrl, string[] redirectionUriFilterProperties)
        {
            UriBuilder          uriBuilder    = new UriBuilder(originalUrl);
            NameValueCollection urlProperties = RedirectionHelper.GetUrlProperties(originalUrl);
            StringBuilder       stringBuilder = new StringBuilder();

            foreach (string text in urlProperties.AllKeys)
            {
                bool flag = false;
                foreach (string text2 in redirectionUriFilterProperties)
                {
                    if (text2.Equals(text, StringComparison.OrdinalIgnoreCase))
                    {
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    if (stringBuilder.Length > 0)
                    {
                        stringBuilder.Append(";");
                    }
                    stringBuilder.Append(text);
                    stringBuilder.Append("=");
                    stringBuilder.Append(urlProperties[text]);
                }
            }
            uriBuilder.Query = stringBuilder.ToString();
            return(uriBuilder.Uri);
        }
        // Token: 0x06000025 RID: 37 RVA: 0x000031FC File Offset: 0x000013FC
        private static bool ShouldBlockConnectionRequest(HttpRequest request)
        {
            if (request == null)
            {
                throw new ArgumentNullException("request");
            }
            NameValueCollection urlProperties = RedirectionHelper.GetUrlProperties(request.Url);

            return("EMC".Equals(urlProperties["clientApplication"], StringComparison.OrdinalIgnoreCase) && string.IsNullOrEmpty(urlProperties["ExchClientVer"]));
        }
        private static bool ShouldAddSessionKey(Uri originalUri, string tenantName)
        {
            if (RedirectionConfig.SessionKeyCreationStatus == RedirectionConfig.SessionKeyCreation.Disable)
            {
                return(false);
            }
            if (!HttpContext.Current.Request.IsSecureConnection)
            {
                return(false);
            }
            NameValueCollection urlProperties = RedirectionHelper.GetUrlProperties(originalUri);

            return(urlProperties["sessionKey"] == null && (RedirectionConfig.SessionKeyCreationStatus != RedirectionConfig.SessionKeyCreation.Partner || string.IsNullOrEmpty(tenantName)));
        }
        // Token: 0x06000035 RID: 53 RVA: 0x00003678 File Offset: 0x00001878
        internal static string ResolveOrganizationName(HttpContext httpContext)
        {
            if (httpContext == null)
            {
                throw new ArgumentNullException("httpContext");
            }
            HttpRequest         request       = httpContext.Request;
            NameValueCollection urlProperties = RedirectionHelper.GetUrlProperties(request.Url);
            string text = null;

            foreach (string name in RedirectionHelper.tenantRedirectionPropertyNames)
            {
                if (!string.IsNullOrEmpty(urlProperties[name]))
                {
                    text = urlProperties[name];
                }
            }
            if (text == null && httpContext.Items["Cert-MemberOrg"] != null)
            {
                text = (string)httpContext.Items["Cert-MemberOrg"];
            }
            return(text);
        }