コード例 #1
0
 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
     });
 }