예제 #1
0
        public static void setToken_dp(user_info user)
        {
            string   token    = RsaUtil.RSAEncryption(JsonUtil.toJson(user));
            DateTime dateTime = DateTime.Now.AddHours(VALID_NUM);

            HttpRuntime.Cache.Insert("scheduling_token_dp", token, null, dateTime, TimeSpan.Zero);
        }
예제 #2
0
 public static user_info getToken()
 {
     try
     {
         string token = HttpRuntime.Cache.Get("scheduling_token").ToString();
         return(JsonUtil.toObject <user_info>(RsaUtil.RSADecrypt(token)));
     }
     catch
     {
         return(null);
     }
 }