Пример #1
0
        /// <summary>
        /// 设置用户cookie
        /// </summary>
        /// <param name="userTicket"></param>
        public static void SetUserCookie(UserTicketInfo userTicket)
        {
            if (userTicket == null)
            {
                return;
            }

            string jsonText   = userTicket.SerializeText();
            string ciphertext = Utils.AES.Encrypt(jsonText, CookieEncryptKey);

            Fetch.SetCookie(Fetch.UC_COOKIE_LOGON_TOKEN, ciphertext);
        }
Пример #2
0
 /// <summary>
 /// 删除用户cookie
 /// </summary>
 public static void DeleteUserCookie()
 {
     Fetch.SetCookie(Fetch.UC_COOKIE_LOGON_TOKEN, "");
 }