public static FormsAuthenticationTicket EncodeAccessToken(AuthModel authModel) { return(new FormsAuthenticationTicket( authModel.ID, authModel.UserName, DateTime.Now, DateTime.Now.AddDays(1), false, authModel.ToToken())); }