This commit is contained in:
gazebo
2019-03-11 15:45:27 +08:00
parent 61fd3b5a90
commit bec5eb85cc

View File

@@ -362,7 +362,7 @@ func GetTokenType(token string) (tokenType int) {
func IsV2Token(token string) bool {
tokenPartList := strings.Split(token, TokenTypeSep)
return tokenPartList[1] == TokenVer
return len(tokenPartList) > 1 && tokenPartList[1] == TokenVer
}
func GuessAuthTypeFromAuthID(authID string) (authType string) {