From 37b874fb1eb33e0937947dc861ad8b6262dfec31 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Fri, 12 Aug 2022 09:46:01 +0800 Subject: [PATCH] dd --- business/auth2/auth2.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index 066ef3ed2..a3cdda650 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -160,6 +160,7 @@ func getFixedTokenName(token string) *AuthInfo { func createAuthInfo(user IUser, authBindInfo *AuthBindEx) (authInfo *AuthInfo) { token, tokenType := createToken(user, authBindInfo) + //user为空 tokenType=2 globals.SugarLogger.Debug("token,tokenType============", token, tokenType) expireDuration := DefTokenDuration authInfo = &AuthInfo{ @@ -365,9 +366,11 @@ func DecryptUserMsg(sessionKey, iv, msg string) (string, error) { // 通过临时TOKEN绑定新创建的用户 func BindUser(inauthInfo *AuthInfo, user IUser) (outauthInfo *AuthInfo, err error) { if err = AddAuthBind(user, inauthInfo); err == nil { + globals.SugarLogger.Debug("进入AddAuthBind=============输出一下user.GetID()", user.GetID()) inauthInfo.AuthBindInfo.UserID = user.GetID() outauthInfo = createAuthInfo(user, inauthInfo.AuthBindInfo) } + globals.SugarLogger.Debug("=============输出一下outauthInfo", outauthInfo) return outauthInfo, err }