获取token

This commit is contained in:
by 2024-09-07 10:43:36 +08:00
parent 9b5dff5f96
commit 759c989719
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import (
"mongo.games.com/game/protocol/machine"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib"
"strconv"
)
type CSPlayerOpPacketFactory struct {
@ -136,7 +137,7 @@ func (h *CSGetTokenHandler) Process(s *netlib.Session, packetid int, data interf
logger.Logger.Tracef("获取娃娃机 appId = %v, serverSecret = %v, streamId = %v", machineInfo.AppId, machineInfo.ServerSecret, machineInfo.StreamId)
//生成token
token, err := token04.GenerateToken04(uint32(machineInfo.AppId), string(p.SnId), machineInfo.ServerSecret, 7200, "")
token, err := token04.GenerateToken04(uint32(machineInfo.AppId), strconv.Itoa(int(p.SnId)), machineInfo.ServerSecret, 7200, "")
if err != nil {
logger.Logger.Error(err)
return err