test登录
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -244,7 +243,7 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string
|
|||||||
realAuthID = user.GetID()
|
realAuthID = user.GetID()
|
||||||
}
|
}
|
||||||
if authBindEx, err = handler.VerifySecret(realAuthID, authSecret); err == nil {
|
if authBindEx, err = handler.VerifySecret(realAuthID, authSecret); err == nil {
|
||||||
// globals.SugarLogger.Debugf("auth2 Login authBindEx:%s", utils.Format4Output(authBindEx, false))
|
globals.SugarLogger.Debugf("testttttttttttttttttttttttttttttttttttt", utils.Format4Output(authBindEx, false))
|
||||||
if authBindEx == nil { // mobile, email会返回nil(表示不会新建AuthBind实体)
|
if authBindEx == nil { // mobile, email会返回nil(表示不会新建AuthBind实体)
|
||||||
user = userProvider.GetUser(authID, authIDType)
|
user = userProvider.GetUser(authID, authIDType)
|
||||||
authBindEx = &AuthBindEx{
|
authBindEx = &AuthBindEx{
|
||||||
@@ -271,7 +270,6 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string
|
|||||||
user = userProvider.GetUser(authBindEx.UserID, UserIDID)
|
user = userProvider.GetUser(authBindEx.UserID, UserIDID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Println("test2222222222222222222222222222222", utils.Format4Output(user, false))
|
|
||||||
authInfo = createAuthInfo(user, authBindEx)
|
authInfo = createAuthInfo(user, authBindEx)
|
||||||
if user != nil && user.GetID() != "" {
|
if user != nil && user.GetID() != "" {
|
||||||
userProvider.UpdateLastLogin(user.GetID(), authType, ctx.GetRealRemoteIP())
|
userProvider.UpdateLastLogin(user.GetID(), authType, ctx.GetRealRemoteIP())
|
||||||
@@ -401,7 +399,6 @@ func createToken(user IUser, authBindInfo *AuthBindEx) (token string, tokenType
|
|||||||
userID := TokenUserEmpty
|
userID := TokenUserEmpty
|
||||||
userName := authBindInfo.AuthID
|
userName := authBindInfo.AuthID
|
||||||
tokenType = TokenTypeOnlyAuth
|
tokenType = TokenTypeOnlyAuth
|
||||||
fmt.Println("test111111111111111111111", utils.Format4Output(user, false))
|
|
||||||
if user != nil {
|
if user != nil {
|
||||||
userID = user.GetID()
|
userID = user.GetID()
|
||||||
userName = "[" + user.GetID2() + "]"
|
userName = "[" + user.GetID2() + "]"
|
||||||
|
|||||||
Reference in New Issue
Block a user