예제 #1
0
        private static string getLocation(WebHeaderCollection headers)
        {
            string location = "";

            for (int i = 0; i < headers.Count; i++)
            {
                string header = headers.GetKey(i);
                if (header.Equals("Location"))
                {
                    foreach (string value in headers.GetValues(i))
                    {
                        location = value;
                    }
                }
            }

            CookieFiap = new CookieFiap()
            {
                Location = location
            };
            return(location);
        }
예제 #2
0
        private static void getCookies(CookieCollection cookies)
        {
            foreach (Cookie c in cookies)
            {
                if (c.Name.Equals("ASP.NET_SessionId"))
                {
                    CookieFiap.ASPNET_SessionId = c.Value;
                }
                else if (c.Name.Equals("jwt"))
                {
                    CookieFiap.Jwt = c.Value;
                }
                else if (c.Name.Equals("ultimoUsuarioFIAP"))
                {
                    CookieFiap.UltimoUsuarioFIAP = c.Value;
                }
                else if (c.Name.Contains("ASPSESSIONID"))
                {
                    CookieFiap.ASPSESSIONID = c.Value;
                }
            }

            CookieFiapJson = CookieFiap.ToJson();
        }