protected virtual string TryGetExplicitLogonNode(ExplicitLogonNode node)
        {
            if (this.ShouldExcludeFromExplicitLogonParsing())
            {
                return(null);
            }
            string text = null;
            bool   nodeIsLast;
            string explicitLogonNode = ProtocolHelper.GetExplicitLogonNode(base.ClientRequest.ApplicationPath, base.ClientRequest.FilePath, node, out nodeIsLast);

            if (!string.IsNullOrEmpty(explicitLogonNode) && this.IsValidExplicitLogonNode(explicitLogonNode, nodeIsLast))
            {
                text = explicitLogonNode;
                ExTraceGlobals.VerboseTracer.TraceDebug <int, string>((long)this.GetHashCode(), "[OwaEcpProxyRequestHandler::TryGetExplicitLogonNode]: Context {0}; candidate explicit logon node: {1}", base.TraceContext, text);
            }
            return(text);
        }
        // Token: 0x060004BF RID: 1215 RVA: 0x0001A238 File Offset: 0x00018438
        protected virtual string TryGetExplicitLogonNode(ExplicitLogonNode node)
        {
            if (this.ShouldExcludeFromExplicitLogonParsing())
            {
                return(null);
            }
            string text = null;
            string text2;
            bool   nodeIsLast;

            if (ExplicitLogonParser.TryGetExplicitLogonNode(base.ClientRequest.ApplicationPath, base.ClientRequest.FilePath, node, ref text2, ref nodeIsLast) && this.IsValidExplicitLogonNode(text2, nodeIsLast))
            {
                text = text2;
                if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(1))
                {
                    ExTraceGlobals.VerboseTracer.TraceDebug <int, string>((long)this.GetHashCode(), "[OwaEcpProxyRequestHandler::TryGetExplicitLogonNode]: Context {0}; candidate explicit logon node: {1}", base.TraceContext, text);
                }
            }
            return(text);
        }
Exemple #3
0
 protected override string TryGetExplicitLogonNode(ExplicitLogonNode node)
 {
     return(base.ClientRequest.QueryString["email"]);
 }
        public static string GetExplicitLogonNode(string applicationPath, string filePath, ExplicitLogonNode node, out bool selectedNodeIsLast)
        {
            ArgumentValidator.ThrowIfNull("applicationPath", applicationPath);
            ArgumentValidator.ThrowIfNull("filePath", filePath);
            selectedNodeIsLast = false;
            string text = null;
            bool   flag = false;
            int    num  = applicationPath.Length;

            if (num < filePath.Length && filePath[num] == '/')
            {
                num++;
            }
            int    num2  = filePath.IndexOf('/', num);
            string text2 = (num2 == -1) ? filePath.Substring(num) : filePath.Substring(num, num2 - num);
            bool   flag2 = num2 == -1;

            if (!flag2 && node == ExplicitLogonNode.Third)
            {
                int num3 = filePath.IndexOf('/', num2 + 1);
                text = ((num3 == -1) ? filePath.Substring(num2 + 1) : filePath.Substring(num2 + 1, num3 - num2 - 1));
                flag = (num3 == -1);
            }
            string result;

            switch (node)
            {
            case ExplicitLogonNode.Second:
                result             = text2;
                selectedNodeIsLast = flag2;
                break;

            case ExplicitLogonNode.Third:
                result             = text;
                selectedNodeIsLast = flag;
                break;

            default:
                throw new InvalidOperationException("somebody expanded ExplicitLogonNode and didn't tell TryGetExplicitLogonNode!");
            }
            return(result);
        }