Esempio n. 1
0
        protected string GetAntiCSRFToken()
        {
            var token = HttpContext.Session.GetString("AntiCSRFToken");

            if (string.IsNullOrEmpty(token))
            {
                token = RandomTool.CreatSafeRandomHex(16);
                HttpContext.Session.SetString("AntiCSRFToken", token);
            }
            return(token);
        }