public static UserToken GenToken(string username, DateTime time) { return(new UserToken() { ExpireDate = time.AddMinutes(ServerOptions.ActionTokenMinutes), HashedToken = HashClass.GenToken(), UserName = username, }); }
public static ActionToken GenToken(int heroid, DateTime time) { return(new ActionToken() { ExpireDate = time.AddMinutes(ServerOptions.ActionTokenMinutes), HashedToken = HashClass.GenToken(), HeroId = heroid, }); }
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 }); }