public static UserToken GenToken(string username, DateTime time)
 {
     return(new UserToken()
     {
         ExpireDate = time.AddMinutes(ServerOptions.ActionTokenMinutes),
         HashedToken = HashClass.GenToken(),
         UserName = username,
     });
 }
示例#2
0
 public static ActionToken GenToken(int heroid, DateTime time)
 {
     return(new ActionToken()
     {
         ExpireDate = time.AddMinutes(ServerOptions.ActionTokenMinutes),
         HashedToken = HashClass.GenToken(),
         HeroId = heroid,
     });
 }
示例#3
0
 public static Tokens GenToken(string username, DateTime time)
 {
     return(new Tokens()
     {
         CreateDate = time,
         ExpireDate = time.AddDays(ServerOptions.PermamentTokenDays),
         HashedToken = HashClass.GenToken(),
         TokenName = HashClass.GenToken(),
         UpdateDate = time,
         UserName = username
     });
 }