dd
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user