コード例 #1
0
ファイル: LoginController.cs プロジェクト: cdy816/mars
 public ResponseBase Logout([FromBody] Requestbase token)
 {
     return(new ResponseBase()
     {
         Result = Cdy.Tag.ServiceLocator.Locator.Resolve <Cdy.Tag.IRuntimeSecurity>().Logout(token.Token)
     });
 }
コード例 #2
0
ファイル: LoginController.cs プロジェクト: cdy816/mars
        public ResponseBase Hart([FromBody] Requestbase token)
        {
            //try
            //{
            //    if (string.IsNullOrEmpty(token.Time))
            //    {
            //        return false;
            //    }
            //    //long ltmp = long.Parse(token.Time);
            //    DateTime dt = DateTime.Parse(token.Time);

            //    if ((DateTime.Now - dt).TotalSeconds > Cdy.Tag.ServiceLocator.Locator.Resolve<Cdy.Tag.IRuntimeSecurity>().TimeOut)
            //    {
            //        return false;
            //    }
            //}
            //catch
            //{

            //}

            return(new ResponseBase()
            {
                Result = Cdy.Tag.ServiceLocator.Locator.Resolve <Cdy.Tag.IRuntimeSecurity>().FreshUserId(token.Token)
            });
        }